re:
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.
I've heard of the GAC, but I don't know enough about it to fix my
problem, or even know where to start.
The GAC is located in the directory : \windows\assembly.
Your ASP.NET identity doesn't have permission to read/execute the files in the GAC
Did you change the ASP.NET identity from the default MachineName\ASPNET ?
( for Windows XP installations... )
If you haven't changed the default identity ( by impersonating a different account... ),
you'll need to assign sufficient permissions to MachineName\ASPNET for that directory.
Warning :
You cannot use Windows Explorer to directly edit ACLs for this folder.
Instead, run the following command using your machine's name in place of MachineName:
cacls %windir%\assembly /e /t /p MachineName\ASPNET:R
That will assign, to your ASP.NET identity (MachineName\ASPNET),
the permissions needed to access the assemblies in the GAC.
If you are impersonating a different account, either change the impersonated account
to MachineName\ASPNET, or assign the permissions to the account you're using.
If you did change the impersonated account, you might also have to assign permission
to access, to that account, the directories listed in this MSDN article :
http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
===================================
I didn't have to touch IIS when I first wrote and ran the scripts the
first time around, but I'll give this a shot, anyway.
How do I configure a web project as an IIS application? I'm running
Windows XP Professional, so I can only have one IIS "web site". I
tried setting up a virtual directory beneath the default web site that
pointed to the folder where my code lives, and made sure the "Virtual
Directory > Application Settings > Application name" field in IIS had a
value (it does). When I tried to access the application
(
http://localhost:99/tinkering/FirstPage.aspx), I get the following
error:
==========================================
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 application event log of
the web server. Please review this log entry to discover what caused
this error to occur.
==========================================
So I went ahead and opened up the "Event Viewer > Application" window,
where I saw the following detailed error message:
==========================================
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.
==========================================
I've heard of the GAC, but I don't know enough about it to fix my
problem, or even know where to start.
-= Tek Boy =-
Peter wrote:
This exception almost always occurs when a web project is not configured as
an IIS application.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
:
A day or two ago, I wrote a quick ASPX page with a CS codebehind using
Visual Studio .NET 2005 -- it worked, I saved it and closed the
project. Today, I came back to the project, reopened the solution, and
was greeted with the following error:
========================================================================
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
========================================================================
I did some searching on Google, and all of the solutions to this
problem involved tweaking IIS. The thing is, I didn't have to touch
IIS when I wrote, compiled and ran the ASPX the first time around --
why would I have to do it during a subsequent visit?
If anybody has any suggestions on how to resolve this problem, I would
greatly like to hear them. Thanks in advance!
-= Tek Boy =-