RE: "The system cannot find the file specified" appears peridically in runtime

  • Thread starter Steven Cheng[MSFT]
  • Start date
S

Steven Cheng[MSFT]

Hi Ofer,

Welcome to ASPNET newsgroup.
From the error info you provided, seems the occur is caused by the page
failed to load the assembly of a certain ascx usercontrol. Is the
<pix:xxxxx ...> the usercontrol? Also, does the problem always occur on
that particular page and the referenced usercontrol? If so, would you
provide the position of the page and usercontrol in your website
application's folder structure (in the same directory or not ....).

Based on my experience, such assembly not found error may caused by the new
different compilation model, when the referenced ascx control is not put in
the same directory with the page that use it, the classes(page class and
the usercontrol's class) may be compiled into different dynamic generated
assembly which cause control reference not found..... Also, is your
usercontrol derived from another ascx usercontrol in the application? If
so, this is also the possible cause, since the base ascx control's class
maybe compiled in to different assembly.
If this is the problem, you can try explicitly add the following directive
in page's aspx to reference the usercontrol(or base usercontrol) so that
the usercontrol's code will be compiled into the same assembly with the
page:

<%@ Reference Control="~/UserControls/WebUserControl.ascx" %>

If there're anything I didn't quite get or any other finding, please feel
free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)






--------------------
| From: "Ofer Zelig" <[email protected]>
| Subject: "The system cannot find the file specified" appears peridically
in runtime
| Date: Wed, 4 Jan 2006 09:46:27 +0200
| Lines: 611
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: line134-75.adsl.actcom.co.il 192.115.134.75
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:368458
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I run a live ASP.NET 2 web site, which is still on trial run, therefore I
| use simple compilation model (all .cs files are uploaded to the server).
|
| Sometimes, and I can't point in which circumstances, the ASP.NET Runtime
| Engine throws the following message, in specific pages (not in all of the
| pages):
|
| A full HTML version of the error is available in the attachment for this
| message.
|
| I could only manually resolve the problem by performing a Stop-Start
actions
| on this web site, or performing a dummy change in Global.asax .
| Needless to say, the code including the mentioned ASCX file is perfect,
and
| there are no permission problems.
|
| Software specifications: Windows Server 2003, IIS 6, .NET runtime
| v2.0.50727, plenty of RAM and HD space.
|
| p.s. a similar problem is described here (submitted by some other person
on
| the web): http://forums.asp.net/799026/ShowPost.aspx (in that case, it's a
| BETA according to the submission date, but in my case it's the full
official
| .NET 2 runtime release)
|
| I'd appreciate a solution for this problem.
|
|
|
 
O

Ofer Zelig

Thank you so much for your answer. I'm sorry for the late response, I wasn't
"online" in the last week.

As for your questions - pix:DispOfficeMajor is indeed the usercontrol. The
error occurs on different pages that use/call this control, and as noted
before - the control (and the whole project) is perfectly compiled.
An interesting point is the directory structure. The website consists of
"public" part, root folder of the website - in which that control resides,
and a backoffice part. As you can see, according to the error report, the
page that threw the error resides inside the BackOffice folder - which is
NOT a virtual directory nor contains a Web.config file. The only means of
difference of the BackOffice folder are in the main site's Web.config file,
where Forms Authentication definition tags refer to it as this folder
(BackOffice) requires authentication (as opposed to the root folder which is
a public web site).
Anyway, I don't think that the above site structure raises the error, since
as I said - a stop-start action on IIS fixes it.

As for your second suggestion - Reference problem. That sounds like a
possible option for the problem. But:
1. The control is called by different ASPX pages. Does each one of them
have to contain the <%@ Reference %> tag? If so - would the control be
compiled with each one of them separately?
2. In any case, as noted - Stop-Start on IIS fixes the issue, so I doubt
if an explicit <%@ Reference %> tag would make the difference. I can't
reproduct the problem (it just happens from time to time) so I can't check
with and without the <%@ Reference %> tag to see if that maked the
difference...
Note - the control is not inherited from another user control.

I'll be glad to get an advise for further suggestions....

Best Regards,
Ofer
 
S

Steven Cheng[MSFT]

Seems a bit different than I've expected. Is it possible that you provide
me a simplified test project with a page and the necessary simplified
usercontrols so that I can test on my local side?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Ofer Zelig" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: "The system cannot find the file specified" appears
peridically in runtime
| Date: Mon, 9 Jan 2006 12:56:48 +0200
| Lines: 138
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: line134-75.adsl.actcom.co.il 192.115.134.75
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:369465
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thank you so much for your answer. I'm sorry for the late response, I
wasn't
| "online" in the last week.
|
| As for your questions - pix:DispOfficeMajor is indeed the usercontrol. The
| error occurs on different pages that use/call this control, and as noted
| before - the control (and the whole project) is perfectly compiled.
| An interesting point is the directory structure. The website consists of
| "public" part, root folder of the website - in which that control resides,
| and a backoffice part. As you can see, according to the error report, the
| page that threw the error resides inside the BackOffice folder - which is
| NOT a virtual directory nor contains a Web.config file. The only means of
| difference of the BackOffice folder are in the main site's Web.config
file,
| where Forms Authentication definition tags refer to it as this folder
| (BackOffice) requires authentication (as opposed to the root folder which
is
| a public web site).
| Anyway, I don't think that the above site structure raises the error,
since
| as I said - a stop-start action on IIS fixes it.
|
| As for your second suggestion - Reference problem. That sounds like a
| possible option for the problem. But:
| 1. The control is called by different ASPX pages. Does each one of
them
| have to contain the <%@ Reference %> tag? If so - would the control be
| compiled with each one of them separately?
| 2. In any case, as noted - Stop-Start on IIS fixes the issue, so I
doubt
| if an explicit <%@ Reference %> tag would make the difference. I can't
| reproduct the problem (it just happens from time to time) so I can't check
| with and without the <%@ Reference %> tag to see if that maked the
| difference...
| Note - the control is not inherited from another user control.
|
| I'll be glad to get an advise for further suggestions....
|
| Best Regards,
| Ofer
|
|
|
| | > Hi Ofer,
| >
| > Welcome to ASPNET newsgroup.
| > From the error info you provided, seems the occur is caused by the page
| > failed to load the assembly of a certain ascx usercontrol. Is the
| > <pix:xxxxx ...> the usercontrol? Also, does the problem always occur
on
| > that particular page and the referenced usercontrol? If so, would you
| > provide the position of the page and usercontrol in your website
| > application's folder structure (in the same directory or not ....).
| >
| > Based on my experience, such assembly not found error may caused by the
| new
| > different compilation model, when the referenced ascx control is not put
| in
| > the same directory with the page that use it, the classes(page class and
| > the usercontrol's class) may be compiled into different dynamic
generated
| > assembly which cause control reference not found..... Also, is your
| > usercontrol derived from another ascx usercontrol in the application? If
| > so, this is also the possible cause, since the base ascx control's class
| > maybe compiled in to different assembly.
| > If this is the problem, you can try explicitly add the following
directive
| > in page's aspx to reference the usercontrol(or base usercontrol) so that
| > the usercontrol's code will be compiled into the same assembly with the
| > page:
| >
| > <%@ Reference Control="~/UserControls/WebUserControl.ascx" %>
| >
| > If there're anything I didn't quite get or any other finding, please
feel
| > free to post here.
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| >
| >
| > --------------------
| > | From: "Ofer Zelig" <[email protected]>
| > | Subject: "The system cannot find the file specified" appears
peridically
| > in runtime
| > | Date: Wed, 4 Jan 2006 09:46:27 +0200
| > | Lines: 611
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: line134-75.adsl.actcom.co.il 192.115.134.75
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:368458
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | I run a live ASP.NET 2 web site, which is still on trial run,
therefore
| I
| > | use simple compilation model (all .cs files are uploaded to the
server).
| > |
| > | Sometimes, and I can't point in which circumstances, the ASP.NET
Runtime
| > | Engine throws the following message, in specific pages (not in all of
| the
| > | pages):
| > |
| > | A full HTML version of the error is available in the attachment for
this
| > | message.
| > |
| > | I could only manually resolve the problem by performing a Stop-Start
| > actions
| > | on this web site, or performing a dummy change in Global.asax .
| > | Needless to say, the code including the mentioned ASCX file is
perfect,
| > and
| > | there are no permission problems.
| > |
| > | Software specifications: Windows Server 2003, IIS 6, .NET runtime
| > | v2.0.50727, plenty of RAM and HD space.
| > |
| > | p.s. a similar problem is described here (submitted by some other
person
| > on
| > | the web): http://forums.asp.net/799026/ShowPost.aspx (in that case,
it's
| a
| > | BETA according to the submission date, but in my case it's the full
| > official
| > | .NET 2 runtime release)
| > |
| > | I'd appreciate a solution for this problem.
| > |
| > |
| > |
| >
|
|
|
 
O

Ofer Zelig

I'm afraid that it would be very complicated to create a test project...
which should resemble as much as possible from our full project (that's
because we can't pinpoint the cause) and on the other hand be "naked"...
 
S

Steven Cheng[MSFT]

Well, that's be a bit hard to locate the actual problem from the surface.
If you feel it an urgent issue, I'd suggest you directly contact PSS to
done some thorough throubleshooting on this which may help you find the
root cause...

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Ofer Zelig" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: Re: "The system cannot find the file specified" appears
peridically in runtime
| Date: Wed, 11 Jan 2006 18:18:44 +0200
| Lines: 218
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: line134-75.adsl.actcom.co.il 192.115.134.75
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:370111
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm afraid that it would be very complicated to create a test project...
| which should resemble as much as possible from our full project (that's
| because we can't pinpoint the cause) and on the other hand be "naked"...
|
|
| | > Seems a bit different than I've expected. Is it possible that you
provide
| > me a simplified test project with a page and the necessary simplified
| > usercontrols so that I can test on my local side?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| > --------------------
| > | From: "Ofer Zelig" <[email protected]>
| > | References: <[email protected]>
| > <[email protected]>
| > | Subject: Re: "The system cannot find the file specified" appears
| > peridically in runtime
| > | Date: Mon, 9 Jan 2006 12:56:48 +0200
| > | Lines: 138
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| > | X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: line134-75.adsl.actcom.co.il 192.115.134.75
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:369465
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Thank you so much for your answer. I'm sorry for the late response, I
| > wasn't
| > | "online" in the last week.
| > |
| > | As for your questions - pix:DispOfficeMajor is indeed the usercontrol.
| The
| > | error occurs on different pages that use/call this control, and as
noted
| > | before - the control (and the whole project) is perfectly compiled.
| > | An interesting point is the directory structure. The website consists
of
| > | "public" part, root folder of the website - in which that control
| resides,
| > | and a backoffice part. As you can see, according to the error report,
| the
| > | page that threw the error resides inside the BackOffice folder - which
| is
| > | NOT a virtual directory nor contains a Web.config file. The only means
| of
| > | difference of the BackOffice folder are in the main site's Web.config
| > file,
| > | where Forms Authentication definition tags refer to it as this folder
| > | (BackOffice) requires authentication (as opposed to the root folder
| which
| > is
| > | a public web site).
| > | Anyway, I don't think that the above site structure raises the error,
| > since
| > | as I said - a stop-start action on IIS fixes it.
| > |
| > | As for your second suggestion - Reference problem. That sounds like a
| > | possible option for the problem. But:
| > | 1. The control is called by different ASPX pages. Does each one of
| > them
| > | have to contain the <%@ Reference %> tag? If so - would the control
be
| > | compiled with each one of them separately?
| > | 2. In any case, as noted - Stop-Start on IIS fixes the issue, so I
| > doubt
| > | if an explicit <%@ Reference %> tag would make the difference. I can't
| > | reproduct the problem (it just happens from time to time) so I can't
| check
| > | with and without the <%@ Reference %> tag to see if that maked the
| > | difference...
| > | Note - the control is not inherited from another user control.
| > |
| > | I'll be glad to get an advise for further suggestions....
| > |
| > | Best Regards,
| > | Ofer
| > |
| > |
| > |
| > | | > | > Hi Ofer,
| > | >
| > | > Welcome to ASPNET newsgroup.
| > | > From the error info you provided, seems the occur is caused by the
| page
| > | > failed to load the assembly of a certain ascx usercontrol. Is the
| > | > <pix:xxxxx ...> the usercontrol? Also, does the problem always
occur
| > on
| > | > that particular page and the referenced usercontrol? If so, would
| you
| > | > provide the position of the page and usercontrol in your website
| > | > application's folder structure (in the same directory or not ....).
| > | >
| > | > Based on my experience, such assembly not found error may caused by
| the
| > | new
| > | > different compilation model, when the referenced ascx control is not
| put
| > | in
| > | > the same directory with the page that use it, the classes(page class
| and
| > | > the usercontrol's class) may be compiled into different dynamic
| > generated
| > | > assembly which cause control reference not found..... Also, is
your
| > | > usercontrol derived from another ascx usercontrol in the
application?
| If
| > | > so, this is also the possible cause, since the base ascx control's
| class
| > | > maybe compiled in to different assembly.
| > | > If this is the problem, you can try explicitly add the following
| > directive
| > | > in page's aspx to reference the usercontrol(or base usercontrol) so
| that
| > | > the usercontrol's code will be compiled into the same assembly with
| the
| > | > page:
| > | >
| > | > <%@ Reference Control="~/UserControls/WebUserControl.ascx" %>
| > | >
| > | > If there're anything I didn't quite get or any other finding, please
| > feel
| > | > free to post here.
| > | >
| > | > Regards,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | > --------------------
| > | > | From: "Ofer Zelig" <[email protected]>
| > | > | Subject: "The system cannot find the file specified" appears
| > peridically
| > | > in runtime
| > | > | Date: Wed, 4 Jan 2006 09:46:27 +0200
| > | > | Lines: 611
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| > | > | Message-ID: <[email protected]>
| > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | NNTP-Posting-Host: line134-75.adsl.actcom.co.il 192.115.134.75
| > | > | Path:
| TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet:368458
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > |
| > | > | I run a live ASP.NET 2 web site, which is still on trial run,
| > therefore
| > | I
| > | > | use simple compilation model (all .cs files are uploaded to the
| > server).
| > | > |
| > | > | Sometimes, and I can't point in which circumstances, the ASP.NET
| > Runtime
| > | > | Engine throws the following message, in specific pages (not in all
| of
| > | the
| > | > | pages):
| > | > |
| > | > | A full HTML version of the error is available in the attachment
for
| > this
| > | > | message.
| > | > |
| > | > | I could only manually resolve the problem by performing a
Stop-Start
| > | > actions
| > | > | on this web site, or performing a dummy change in Global.asax .
| > | > | Needless to say, the code including the mentioned ASCX file is
| > perfect,
| > | > and
| > | > | there are no permission problems.
| > | > |
| > | > | Software specifications: Windows Server 2003, IIS 6, .NET runtime
| > | > | v2.0.50727, plenty of RAM and HD space.
| > | > |
| > | > | p.s. a similar problem is described here (submitted by some other
| > person
| > | > on
| > | > | the web): http://forums.asp.net/799026/ShowPost.aspx (in that
case,
| > it's
| > | a
| > | > | BETA according to the submission date, but in my case it's the
full
| > | > official
| > | > | .NET 2 runtime release)
| > | > |
| > | > | I'd appreciate a solution for this problem.
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top