Click here to Skip to main content
15,944,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have an website that I deploy for a customer that was working fine, but now it gives this error.

C#
The current identity (IIS APPPOOL\abc.com) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: The current identity (IIS APPPOOL\abc.com) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[HttpException (0x80004005): The current identity (IIS APPPOOL\abc.com) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'.]
   System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +948
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +319

[HttpException (0x80004005): The current identity (IIS APPPOOL\abc.com) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +646
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +771

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Posted
Updated 14-Feb-23 3:50am

You can resolve this issue in the following way:

1. Create a Windows Domain\Local Machine user account with a strong password.
2. Using Windows Explorer, go to C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files.
3. Give the new user you created in step 1 Full Control permission to the folder path. Click Apply and OK.
4. You need to specify the user you created as the IISAppPool identity for either WS2012AppPool or WS2013AppPool (depending on which version you installed) using the following links:

IIS 7 and above:

http://technet.microsoft.com/en-us/library/cc771170(v=ws.10).aspx

IIS 6:

http://blogs.msdn.com/b/friis/archive/2010/10/08/steps-for-setting-up-a-custom-identity-of-an-iis-6-application-pool.aspx
C#

 
Share this answer
 
Thanks for all who response to my problems.
The Problem has been due to low disk space on server. I just empty out some old data and the site is live agian.
 
Share this answer
 
add tempDirectory="d:\local\temp\ field in compilation Tag inside system.web in wweb.config to remove the error("The current identity (IIS APPPOOL\abc.com) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'")
 
Share this answer
 
First check if your framework folder (C:\Windows\Microsoft.NET\Framework64\v2.0.50727/v4.0.30319) has this "Temporary ASP.NET Files". If not then create one with this name. Then check for permission (Properties -> Security -> IIS_IUSER -> Allow all permissions)

This resolved my issue.
 
Share this answer
 
Don't add permissions. Just change the TEMP directory for ASP.NET in your web.config file!
<system.web>
  <compilation debug="true" targetFramework="4.6.1"  tempDirectory="c:\temp"/>
  ...
</system.web>
 
Share this answer
 
Comments
Dave Kreskowiak 14-Feb-23 14:52pm    
Look at the date on the question. It's from 2014.
Richard Deeming 15-Feb-23 4:42am    
Aside from the age of the question, this solution was already suggested in solution 4, posted over three years ago.

And the OP solved their own problem nine years ago by freeing up some space on their system drive.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900