11

I deployed the Nuget source code to my company's web server, but when navigate to the URL, I get the following error (pulled from Event Viewer on the server):

Event code: 4011 
Event message: An unhandled access exception has occurred. 
Event time: 11/6/2013 9:02:54 AM 
Event time (UTC): 11/6/2013 3:02:54 PM 
Event ID: 2f5d6f7e594e47259b6dc050f82fc57d 
Event sequence: 2 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/2/ROOT/Nuget-3-130282237713215393 
    Trust level: Full 
    Application Virtual Path: /Nuget 
    Application Path: E:\omitted\omitted\Nuget\ 
    Machine name: SERVERNAME

Process information: 
    Process ID: 1420 
    Process name: w3wp.exe 
    Account name: DOMAIN\serviceAccount 

Request information: 
    Request URL: http://subdomain.domain.net/nuget 
    Request path: /nuget 
    User host address: ***.**.***.** 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: DOMAIN\serviceAccount 

Custom event details: 

This will run just fine on my local machine, but not on the web server. Does anyone have any ideas as to what the problem might be? All I did was take the Nuget source code, modify the database details in the web.config to point to my database, and deploy it to the web server.

Mike Marks
  • 10,017
  • 17
  • 69
  • 128

4 Answers4

19

The local users group needed modify permissions to get past this error. Resolved.

Mike Marks
  • 10,017
  • 17
  • 69
  • 128
  • 2
    This did it for me. After playing around with App Pool Authentications, etc I found that the local users group was missing write permissions. +1 sir. – Francisco Garcia Aug 05 '14 at 19:25
  • 2
    I was using Network Service as my application pool identity. The physical path to my site had modify rights for Network Service. I then found out in the `Advanced Settings` of my application pool the `Load User Profile` was set to **False**. I needed to change this value to **True**, which fixed this error. – Josh Schultz Dec 21 '16 at 21:13
  • local users group is overkill, and potentially adds more users than necessary. I added Read and Modify to the Packages directory for the specific Application Pool "IIS AppPool\Asp.NET v4.0" user. Your Application Pool may be named differently. – JJS Aug 30 '18 at 18:34
5

I would just like to clarify for anyone else who comes to this question. The permissions need to be changed on the folder where the website resides in windows explorer.

smithygreg
  • 525
  • 1
  • 7
  • 11
2

I had this exact error - the only solution that worked was setting the app pool's Enable 32-bit Applications advanced setting to True.

Update: As I continue to have issues with a particular solution, I've found that clearing the C:\WINDOWS\Microsoft.NET\Framework\v4.xxx.xx\Temporary ASP.NET Files\ resolves the issue in most cases.

Adam K
  • 153
  • 3
  • 8
0

This error can also occur if for some reason access to a single file is unexpectedly denied. In my case the website was working fine but after a while access to a temporary entity framework edmx cache file was denied. Deleting this file solved the problem.

Setting CustomErrors in Web.Config to Off gave me the details about the error. These details were not present in the event log viewer.

Bas de Raad
  • 556
  • 1
  • 6
  • 15