Monday 9 June 2008

Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005

I started working on a new website yesterday, and this time, rather than starting it as a webpage, I figured I'd use the proper TheBeerHouse (TBH) approach, and actually create a blank project, and then add the website as an existing project to it.

I referenced the other projects required for everything to run (a web captcha control and a CustomEvents project), renamed all the namespaces, and figured I'd be on my way.


But my trustworthy Internet Explorer decided to give me hell, and just showed a page with an error message in bold red:

Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the system event log of the web server. Please review this log entry to discover what caused this error to occur.


The application log showed the following messages (abbreviated)

Failed to initialize the AppDomain:/LM/W3SVC/1/Root/

Exception: System.IO.FileLoadException

Message: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.

Followed by:

Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005 Access
is denied.


And finally:


aspnet_wp.exe (PID: 1924) stopped unexpectedly.

As it turns out, due to setting up the site as a project, ASP.NET doesn't automatically get its permissions assigned to the project folder. Doing that manually solved the problem.

No comments: