简体   繁体   中英

Could not load file or assembly {assembly name here} or one of it's dependencies. Access is denied

So sometimes our web servers (Windows Server 2008, IIS 7.5) will randomly get this error on a really really old .net 2.0ish asp.net/classic asp web site that we have.

Normally an IIS reset will clear up the issue, but this issue is now starting to affect our production servers (can't really IIS reset these in the middle of the day) and it also seems to be happening more often every where else.

So I've been looking into possible fixes for this issue, but the only one that seems to be popping up everywhere is that if I grant NETWORKSERVICE/IIS_WPG full control over the temporary asp.net files it should just fix itself. Last I checked, this wasn't really a good idea as you really didn't want your web applications to have full control over anything (especially not on a production web server).

Any guidance on this issue would be appreciated.

Thanks, Alex

Example Errors:

Server Error in '/' Application.

Could not load file or assembly 'Csla.Extension' 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 'Csla.Extension' or one of its dependencies. Access is denied.


Could not load file or assembly 'AjaxControlToolKit' 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 'AjaxControlToolKit' or one of its dependencies. Access is denied.

Source Error: [No relevant source lines]

Source File:

c:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files\\root\\2794b922\\App_Web_search.aspx.cdcab7d2.jqmd63vs.0.cs

I think your problem is with IIS, in regards with what permission it has to folders(eg. project folders).So check your application which application pool its in. So you can give the appropriate rights to the account in that pool. By default in IIS7, the account is NETWORK SERVICE.

Then you would essentially go to the relevant folders and allow read/write access or whichever needed to the account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM