By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,905 Members | 900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,905 IT Pros & Developers. It's quick & easy.

'Could not load file or assembly' every few days - asp.net 1.1

P: n/a
Hi

I am running a site built on asp.net 1.1 on a windows server 2003 (which is
running asp.net 2.0 - shared hosting at my webhost). The site is low traffic
and very simple (mostly static text apart from a couple of usercontrols that
pull info from a sql db).

The problem I'm getting is that it will run fine for a few days, then
suddenly the following error will occur:
--------------------------------------------------
Could not load file or assembly 'Foo, Version=1.0.2388.18427,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is
denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or
assembly 'Foo, Version=1.0.2388.18427, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. Access is denied.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine
why the assembly 'Foo, Version=1.0.2388.18427, Culture=neutral,
PublicKeyToken=null' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'Foo,
Version=1.0.2388.18427, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Access is denied.]
FooWebsite.FooPage.Page_Load(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
--------------------------------------------------

I have read various posts on this and other similar issues and the only
resolution seems to be to re-upload one of the DLLs the site uses to its bin
directory. Doing this seems to reset the site and all works fine again.
Obviously this is far from ideal!

From what I've been reading this issue is something to do with permissions
on the Temporary asp.net files folder.

The other annoyance is that this error does not get trapped by my custom
error hander page (as specified in web.config), so I do not receive the
automatic notification I've set up in that page.

Further configuration info:
- I am not using impersonation
- Deployment model is precompiled (isn't that the only option in 1.1?)
- No web farm, single server
- Load Balancing enabled

Any ideas?

thanks

Richard Bysouth

-----------
Please provide code examples in VB if possible...thanks!
-----------
Sep 5 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Richard,

Based on my experience, this kind of "Access Denied" problem when
generating or loading assembly is very likely related to background
Anti-Virus or Indexing service. You can find more information here:

#Diagnose "Access Denied" error on Assembly Loading
http://blogs.msdn.com/junfeng/archiv...09/240355.aspx

If you do have Anti-Virus or Indexing service running in the background,
you may try excluding the "Temporary ASP.NET Files" folder from the service
and see if it works.

If not, you may try to use File Monitor from http://www.sysinternals.com
and monitor on the server to see the cause of the issue.

I hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 6 '06 #2

P: n/a
Walter

Thanks for getting back to me so quickly :)

Have passed this information on to my hosting company and will see if they
can fix it - hopefully excluding the temporary asp.net files folder from
antivirus will resolve it.

Richard
Sep 6 '06 #3

P: n/a
Hi Richard,

Thank you for your update.

Please do let me know the result. I will be glad to continue working with
you if it's not the case.

Have a nice day!

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 6 '06 #4

P: n/a
Walter

Sorry for the delay in getting back to you on this.

Yes, your solution appears to have resolved the problem perfectly! It took a
bit of convincing to get my hosting company to make the change, but all is
running well again now!

Thanks very much for your help

Richard
Sep 12 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.