Technical: Microsoft – IIS – Error – The current identity does not have write access to ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files’.

Technical: Microsoft – IIS – Error – The current identity <identity-account> does not have write access to ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files’.

Background

Ending up with errors running a Microsoft .Net Web Application.  The error message states that I do not have write permissions to the Temporary ASP.Net Files folder.

 

NTFS Permissions

 

use Calcs, get permissions on Temporary ASP.NET Files

Using calcs, list permissions on folder *\v2.0.50727\Temporary ASP.NET Files


CACLS "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files"

Got a lot of data, the most valuable are the entries for IIS_WPG:


CACLS "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" | find /I "IIS_WPG"

Output:

calcs-IIS_WPG

 

It quickly dawned on me that I am looking at this the wrong way. Rather than attempt to explicitly grant permission to my Application Pool account, I should just add my Application Pool account to the machine’s IIS_WPG group.

 

Local Group — IIS_WPG

List local group users

net localgroup IIS_WPG

 

Output:

netlocalgroup--IIS_WPG

 

Add Application Pool Account to Local IIS_WPG group

Let us add our IIS Application Poo account to the machine’s IIS_WPG Group.

Syntax:

net localgroup IIS_WPG /add <Account>

Command:


net localgroup IIS_WPG /add "LAD-DOMAIN\AppPool"
The command completed successfully.

Output:

netlocalgroup--IIS_WPG--addAccount

Clear Temporary Folder

But, still ending up with errors until I cleared the Temp Folder.

Clear temp folder.

Syntax:



del "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" /s /Q

del "C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files" /s /Q

FOR /D %G in ("C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*") do RMDIR /S /Q "%G" 

FOR /D %G in ("C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\*") do RMDIR /S /Q "%G"

 

References

Changing Temporary ASP.Net Files

Dos Commands

Dos Commands – rmdir

 

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s