Saturday, December 17, 2005
« New Toys | Main | 2nd Utah Geek Dinner »

I've been recently dabbling with the DotNetNuke version 4.0.  I'm completely new to it, and wanting to experiment with it having created many web applications myself I wanted to see what it's like - I hear great things.

Any who follows this blog is very aware that I don't run under an administrative account, preferring instead to always run as a low privileged account.  Well, most of the web applications that I have on my laptop target the .NET 1.1 framework.  All of the .NET 2.0 web applications have run under Cassini and are file-based rather than installed as a virtual directory in IIS, therefore some things had not been configured to run properly using .NET 2.0 and IIS.

Upon setting up DNN and attempting to run it I ran into the 'Server Application Unavailable' error message.  I examined the event log and saw the following 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.

Ok, well doesn't mean that *I* don't have read access to the GAC (which I do)...it's indicating that the account associated with ASP.NET 2.0 applications doesn't have permissions to the GAC.  In this case that's MACHINENAME\ASPNET.  You might be tempted to open up Windows Explorer, navigate to the %WINDIR%\assembly folder (for that's the location for the GAC), right click it, and change security settings.  As it turns out, however, Windows virtualizes this folder and its contents into an aggregated view of the GAC contents rather than actual directories.  That option is out.

How then do we grant permissions on the GAC?  The answer is pretty easy actually: we use a commandline utility called CACLS.  Open up a command window and run the following command (or something similar to it):

CACLS %WINDIR%\assembly /e /t /p [DOMAIN|MACHINENAME]\useraccount:R

Substituting either your domain name (for a domain account) or machine name (for a local account) as appropriate.  The command line grants Read permission to the specified account to all files and folders in the specified folder.

You might also need to do something similar to your application's directory.

As it turns out, however, I don't want my web applications to run under ASPNET.  Instead I prefer to run them as my personal account so I can debug the applications (being that I'm not an administrator).  I had already used the aspnet_setreg utility to encrypt my credentials in the registry.  I then simply needed to update the <processModel /> element in the %WINDIR%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config file to resemble the following:

<processModel
   autoConfig="true"
   userName="registry:HKLM\Software\ASPNET\Identity\ASPNET_SETREG,userName"
   password="registry:HKLM\Software\ASPNET\Identity\ASPNET_SETREG,password"
/>

By doing this, I don't have to worry about granting the ASPNET account read access to the GAC (which I did anyway) and I ensure that ASP.NET 2.0 applications run under my local account (giving me all the access I need to run and debug them).

Saturday, December 17, 2005 8:08:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [34]  |  Trackback
Wednesday, February 15, 2006 2:59:00 AM (Mountain Standard Time, UTC-07:00)
The simplest way to handle this error is to do the following;



1) Open IIS

2) Select the Folder

3) Right Button Click on the Folder

4) Click Permission Wizard

5) All should be ok
Tuesday, February 21, 2006 2:00:00 PM (Mountain Standard Time, UTC-07:00)
"The simplest way to handle this error is to do the following; .."



Robert - THANK YOU

Other methods of suposedly fixing this didn't do so on my PCs... but this simple method did!



Steve Bywaters
Saturday, April 08, 2006 12:10:00 PM (Mountain Standard Time, UTC-07:00)
I know the feeling when you need a solution and nothing works...But we have to keep searching until we find answers, because most people ask us so who do we turn to?
Tuesday, May 16, 2006 10:54:00 AM (Mountain Standard Time, UTC-07:00)
The problem I had after all of the above was the fact ASPNET didn't have access to the wwwroot directory, AND that the application pool wasn't set to run scripts.



The latter problem can be addressed by pulling up the properties of the web application in IISAdmin and checking the Execute Permissions pulldown.
John Walker
Sunday, May 21, 2006 1:51:00 PM (Mountain Standard Time, UTC-07:00)
This problem happened in my application, I did the procedure and it worked, but in the following day the same problem happened. Someone can help me?
Sunday, May 21, 2006 3:01:00 PM (Mountain Standard Time, UTC-07:00)
Anderson,



Which procedure did you follow? Did you manually grant permissions to the GAC via CACLS or did you do it via IIS? Does your website do impersonation? If so, does that user have the appropriate permissions? Are you by chance connecting as a different user the second time? Make sure that the user in question has rights to the proper directories.
Monday, August 14, 2006 9:30:00 AM (Mountain Standard Time, UTC-07:00)
The simplest way to handle this error is to do the following;



1) Open IIS

2) Select the Folder

3) Right Button Click on the Folder

4) Click Permission Wizard

5) All should be ok





This really WORKED!! I can't believe this .. ufff ;-)
Raghu
Thursday, August 31, 2006 10:27:00 AM (Mountain Standard Time, UTC-07:00)
It resolved after adding aspnet on application.



Thanks one and all.



Keep it up !!!



Dinesh Bhandare
Thursday, September 21, 2006 8:18:00 PM (Mountain Standard Time, UTC-07:00)
I think the problem in our case was installing the ASP.NET 2.0 Framework after creating que site, so the permissions were not correct.

Restoring default permissions with the process described by Robert solved the problem flawlessly.



Thanks!
Thursday, October 26, 2006 12:43:00 AM (Mountain Standard Time, UTC-07:00)
I have gone so far as to temporarily make the ASPNET user an admin on the server but still have this problem. We are on Win 2000 / IIS 50. It sounds to me like most of the above were 2003/IIS6.0.



Any thought??
Clayton Hoyt
Thursday, October 26, 2006 2:48:00 AM (Mountain Standard Time, UTC-07:00)
Clayton,



Have you tried the suggestions above? (i.e. running CACLS, granting permissions within IIS, running the ASPNET_SETREG tool, etc)?
Wednesday, November 01, 2006 2:59:00 PM (Mountain Standard Time, UTC-07:00)
The simplest way to handle this error is to do the following;



1) Open IIS

2) Select the Folder

3) Right Button Click on the Folder

4) Click Permission Wizard

5) All should be ok





This really WORKED!! I can't believe this .. ufff ;-)

Thanks!
Frank
Wednesday, January 03, 2007 2:38:00 PM (Mountain Standard Time, UTC-07:00)
Dudes,



Thanks, this one was killing me. Permision Wizard straightened me out! Whew!.



Thanks!
Andew McCatty
Thursday, February 08, 2007 4:03:00 AM (Mountain Standard Time, UTC-07:00)
Sorry, I am using Win 2000 server and I would like to use "The simplest way to handle this error ..." but I do not know how to do the following;



1) Open IIS --- do you mean the Inrenet Service Manager under Administration tool? If so,

2) Select the Folder --- which folder to select?

3) Right Button Click on the Folder

4) Click Permission Wizard

5) All should be ok



Can you give some details? Forgive me for my laking of the knowledge and thank you very much.
Thursday, February 08, 2007 4:24:00 AM (Mountain Standard Time, UTC-07:00)
David



1) yes, Internet Service Manager

2) the folder/application exhibiting the permission problems

3) 4) 5) yep, yep, yep



:)



Does that clarify?
Sunday, April 22, 2007 8:34:00 PM (Mountain Standard Time, UTC-07:00)
Just to thanks Aaron, it worked for me too!

Although I could not understand what caused the problem and neither how this simple procedure solved it...

Regards
Thursday, May 03, 2007 3:55:00 AM (Mountain Standard Time, UTC-07:00)
I have tried all suggestions, one that I have a question on is the Permissions Wiz. Do you replace all perms or not?

I did both, replace and keep but add perms, to my folder and now I get the following error:

Directory Listing Denied, This virtual directory does not allow contents to be listed



Any help for this one?

Chuck
Chuck
Thursday, May 03, 2007 4:18:00 AM (Mountain Standard Time, UTC-07:00)
Chuck,



Do you have a default document specified for your virtual directory? If not, you may consider doing so. Alternatively, you can enable directory listing via a checkbox on the property dialog.
Saturday, May 05, 2007 3:57:00 AM (Mountain Standard Time, UTC-07:00)
Thank goodness for Permission Wizard... I found under "All Tasks"
cdk
Wednesday, August 08, 2007 5:28:00 AM (Mountain Standard Time, UTC-07:00)
thanks...it worked.....
mild
Tuesday, August 14, 2007 9:41:00 AM (Mountain Standard Time, UTC-07:00)
You guys suggesting the "easy" way have a completely different problem than the one that this blog post is about... you're talking about basic IIS permissions problems.



The problem that this post actually addresses (and that was the solution to my two-hour headache) is the case where the IWAM account of a fresh ASP.NET install doesn't have permissions to access the GAC for whatever reason... namely, because Microsoft -- unbelievably -- forgot to consider certain not-so-uncommon configurations when crafting their .NET Framework installer.



In my case, I'm on a Windows 2000 Advanced Server SP4 box (IIS 5) that I setup as a secondary domain controller, so there's no ASPNET user, and aspnet_wp.exe runs under the IWAM_[Machine Name] account. Simply executing the command provided in the blog post fixed the problem:





CACLS %WINDIR%\assembly /e /t /p MYDOMAIN\IWAM_MyServerName:R



Bokonon
Wednesday, December 05, 2007 4:29:00 AM (Mountain Standard Time, UTC-07:00)
The simplest way to handle this error is to do the following;



1) Open IIS

2) Select the Folder

3) Right Button Click on the Folder

4) Click Permission Wizard

5) All should be ok

2/15/2006 9:59 AM | Robert Burkhall



Thank you, Robert! Your simple suggestion is the most correct way to solve this problem. I remember this old saying: when things get more complicated, you might be heading in the wrong direction!

John Lin
Wednesday, December 26, 2007 7:13:00 PM (Mountain Standard Time, UTC-07:00)
Thanks cdk, just what I was looking for and it worked for me alse
Xander Erkamp
Tuesday, January 01, 2008 6:56:00 PM (Mountain Standard Time, UTC-07:00)
Hi ,

I followed the steps:

1) Open IIS

2) Select the Folder

3) Right Button Click on the Folder (Reports)

4) Click Permission Wizard

5)IT was asking Do you wan to inherit Security settings from teh arent site or virtual directory or do u wan to select new security settings?

Inherit all security settings or

Select new security settings from templete.



i have done one by noe each but getting the same "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." error.

Please help me on this ,i was missing some where in the 5th step.



Regards,

Sam.
Sam
Tuesday, February 12, 2008 11:49:00 PM (Mountain Standard Time, UTC-07:00)
- rated a 5.
Good
Saturday, February 16, 2008 9:58:00 AM (Mountain Standard Time, UTC-07:00)
dfgdgdgdf
Antivirüs indir
Saturday, February 16, 2008 9:59:00 AM (Mountain Standard Time, UTC-07:00)
sadafsdfdsf!
Saturday, February 16, 2008 10:00:00 AM (Mountain Standard Time, UTC-07:00)
sdfsfsdfsd
Saturday, February 16, 2008 10:00:00 AM (Mountain Standard Time, UTC-07:00)
sadasd
Sunday, February 24, 2008 2:59:00 PM (Mountain Standard Time, UTC-07:00)
Thank you for this article.

It's useful for me.
Tuesday, February 26, 2008 9:29:00 PM (Mountain Standard Time, UTC-07:00)
this has been gr8 help! thanks
ace
Thursday, March 13, 2008 8:35:00 AM (Mountain Standard Time, UTC-07:00)
Gil
Tuesday, April 22, 2008 12:14:00 AM (Mountain Standard Time, UTC-07:00)
Nothing worked for me! I hate microsoft. You can get stuck in seemingly less complicated stuff. Time to switch to open source. Atleast its easier to get answers to common problems.
RSbob
Tuesday, May 06, 2008 9:12:00 PM (Mountain Standard Time, UTC-07:00)
Thanks! It Really Worked.



I have been stucked by this problem for 2 months but now it is solved.

Manish Gangwal
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, i, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview