Skip to content

Classic ASP error on IIS7

If you’re getting an ASP error in your event logs reading “Error: The Template Persistent Cache initialization failed for Application Pool ‘AppPoolName’ because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes..”, you may need to reset the permissions on the folder in question to give Network Service modify rights, normally the folder is C:inetpubtempASP Compiled Templates, but an article ( showed an elegant way to do this:

Check the path for ASP cache:

%windir%system32inetsrvappcmd list config -section:system.webServer/asp
    <session />
    <comPlus />
    <cache diskTemplateCacheDirectory=”%SystemDrive%inetpubtempASP Compiled Templates” />
    <limits />

Ensure the path exists (from above):

mkdir “%SystemDrive%inetpubtempASP Compiled Templates”
A subdirectory or file C:inetpubtempASP Compiled Templates already exists.

Ensure the permissions include NETWORK SERVICE:

icacls “%SystemDrive%inetpubtempASP Compiled Templates” /grant “NETWORK SERVICE:(OI)(CI)(M)”
processed file: C:inetpubtempASP Compiled Templates
Successfully processed 1 files; Failed processing 0 files
Back To Top