Could not load file or assembly {assembly name here} or one of these dependencies. Access denied

Therefore, sometimes our web servers (Windows Server 2008, IIS 7.5) will randomly receive this error on the really really old asp.net/classic asnet.net 2.0 website. We have.

Usually IIS reset fixes the problem, but this problem now starts to affect our production servers (in fact, it is not IIS reset in the middle of the day), and it also seems to happen most often somewhere else.

So, I was looking for possible fixes for this problem, but the only one that seems to pop up everywhere is that if I gave NETWORKSERVICE / IIS_WPG full control over asp.net temporary files, it should just fix itself. The last thing I checked was not a good idea, since you really did not want your web applications to fully control everything (especially on the production web server).

Any guidance on this would be appreciated.

Thanks Alex

Examples of errors:

Server error in application "/".

Failed to load file or assembly "Csla.Extension" or one of its dependencies. Access denied. Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace for more information about the error and where it appeared in the code.

Exception Details: System.IO.FileLoadException: Failed to load file or assembly "Csla.Extension" or one of its dependencies. Access is denied.


Failed to load file or assembly "AjaxControlToolKit" or one of its dependencies. Access denied. Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace for more information about the error and where it appeared in the code.

Exception Details: System.IO.FileLoadException: Failed to load file or assembly "AjaxControlToolKit" or one of its dependencies. Access is denied.

Source Error: [No matching source lines]

Original file:

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

+4
source share
1 answer

I think your problem is with IIS as to what permission it has for folders (e.g. project folders). Check your application in which its application pool. Thus, you can grant the appropriate account rights in this pool. By default in IIS7, the account is NETWORK SERVICE.

Then you essentially navigate to the appropriate folders and allow read / write access, or whichever you need.

0
source

Source: https://habr.com/ru/post/1438030/


All Articles