4

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

user1079703
  • 442
  • 6
  • 15
  • Are you using anonymous access? What permissions does your IIS user currently have to "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"? You do not have to give it full control but in most cases it needs at least Read and Write permission. – Gene S Oct 05 '12 at 15:40
  • Any chance this is arising as a result of an unexpected IIS and/or application pool crash/restart? Might check the logs for something like this. – David W Oct 05 '12 at 15:43
  • @David W - Yes the site is really old and bulky so the app pool restarting is a definite possibility. We currently have it set up to recycle once a night, but it does recycle every so often due to awesome amounts of memory leaks. – user1079703 Oct 05 '12 at 15:46
  • @Gene S - The site uses windows auth (but now that I am looking at it it has both forms and windows auth checked). IIS_IUSRS (which I assume has NETWORKSERVICE (the iis account which the app pools under it)) has Read&Execute, List Folder Contents, and Read access. I can give it Write permissions as well, but again isn't that a security risk? – user1079703 Oct 05 '12 at 15:50

1 Answers1

0

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.

Vee
  • 23
  • 4