y0mbo
y0mbo

Reputation: 4602

ASPNET user does not have write access to Temporary ASP.NET Files

I get the following error when running my Visual Studio 2008 ASP.NET project (start without Debugging) on my XP Professional box:

System.Web.HttpException: The current identity (machinename\ASPNET) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

How can I resolve this?

Upvotes: 8

Views: 51565

Answers (8)

user1585204
user1585204

Reputation: 965

Just because the most recent answer is 5 years old, what had to be done in our environment was to delete the app, app pool and recreate them.

We evidently have some security under the hood with recent changes to it.

Doing this re-created a folder in Temporary ASP Net Files with all the correct permissions. Why the one site I happened to just get from source control, rebuild, etc. failed this way, no idea. 2 others recently set up where Get Latest Version was downloaded, rebuilt, etc. they just worked.

But ripping out the app, app pool and just recreating them with the same IIS permissions as the 2 other known working sites recreated all the needed objects and now it all works.

Upvotes: 0

emp
emp

Reputation: 5065

I had this problem when trying to build a Web Deployment Project (*.wdploy). Simply creating the folder on the framework path solved the error.

Upvotes: 0

Djay
Djay

Reputation: 121

I had the same problem. This is what I did:

  1. Go to c:\windows\microsoft.net\framework\v2.0.50727
  2. right click on "Temporary ASP.NET files"
  3. Security tab
  4. Select "Users(xxxxxx\Users) from Group
  5. check "Write"
  6. OK

Upvotes: 12

Pragnesh Patel
Pragnesh Patel

Reputation: 1444

you can right click the Visual Studio & select run as administrator.

Upvotes: 0

Mitchel Sellers
Mitchel Sellers

Reputation: 63126

You can try to fix it using the automated regiis utility aspnet_regiis.ext available in c:\windows\microsoft.net\framework\v2.0.50727

Otherwise just manually add the needed file permissions as noted in the error.

Upvotes: 0

Ken Ray
Ken Ray

Reputation: 2528

Either grant that user the level of access to that directory, or change the identity that the application's application pool runs under - in IIS Manager, determine what App Pool is used to run your application, then in the App Pool section of IIS Manager, look at the properties for that pool - the tab you want is "Identity" I think (this is off the top of my head).

You can set it to another user account - for example, Crystal Reports .Net requires update and delete access to C:\Temp - so we have a "webmaster" user, with administrator access, and use that identity for those applications.

Upvotes: 3

ddc0660
ddc0660

Reputation: 4052

Make sure the ASPNET user has permission to write to that folder. Right click on the folder, Properties, Security tab.

Upvotes: -1

DevelopingChris
DevelopingChris

Reputation: 40788

Have you tried, the aspnet_regiis exe in the framework folder?

Upvotes: 15

Related Questions