"The Template Persistent Cache initialization failed for Application Pool" on IIS 7 using Classic ASP
Issue
When restarting IIS the following error may appear in the event log:
Log Name: Application
Source: Active Server Pages
Event ID: 5
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Description: Error: The Template Persistent Cache initialization failed for Application Pool 'DefaultAppPool' because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes..
Resolution
Check the path for ASP cache:
%windir%\system32\inetsrv\appcmd list config -section:system.webServer/asp
<system.webServer>
<asp>
<session />
<comPlus />
<cache diskTemplateCacheDirectory="%SystemDrive%\inetpub\temp\ASP Compiled Templates" />
<limits />
</asp>
</system.webServer>
Ensure the path exists (from above):
mkdir "%SystemDrive%\inetpub\temp\ASP Compiled Templates"
A subdirectory or file C:\inetpub\temp\ASP Compiled Templates already exists.
Ensure the permissions include NETWORK SERVICE:
icacls "%SystemDrive%\inetpub\temp\ASP Compiled Templates" /grant "NETWORK SERVICE:(OI)(CI)(M)"
processed file: C:\inetpub\temp\ASP Compiled Templates
Successfully processed 1 files; Failed processing 0 files
This can be caused by using the MOVEIIS7ROOT.CMD script, and then adding components at a later date.
References
Products
Microsoft Windows Server 2008 (any)
Microsoft Internet Information Services 7.0
Created: 14th July 2009
Updated: 17th July 2009
© 2005-2024 Jamie Morrison