I installed a classic ASP application on my SBS 2008 server (see Moving Liberum Help Desk to SQL 2005 Express). When accessing the application from a browser, the following message is generated in the server’s Application event log:
Log Name: Application
Source: Active Server Pages
Event ID: 5
Description: Error: The Template Persistent Cache initialization failed for Application Pool ‘My Classic ASP App’ because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes.
Find the ASP Compiled Templates Folder
There are several articles, including MSKB 332097, that say you have to give NETWORK SERVICE Full Control of the ASP Compiled Templates folder.
But where is that folder? Most articles refer to Windows Server 2003, and it’s moved under Server 2008. This article has a great trick to locate the folder: type the following at an elevated command prompt:
%windir%\system32\inetsrv\appcmd list config -section:system.webServer/asp
On my machine, that returned the following:
<cache diskTemplateCacheDirectory="%SystemDrive%\inetpub\temp\ASP Compiled Templates" />
So now we know that ASP Compiled Templates is under C:\inetpub\temp.
Not NETWORK SERVICE
Giving NETWORK SERVICE Full Control of that folder did not solve the problem, however.
The reason is that the Application Pool is set to run with a custom Identity so it can access the application’s SQL database. Here is a screen shot of the IIS Application Pool Advance Properties I created:
Once I gave that custom Active Directory user Full Control of ASP Compiled Templates directory, the persistent cache error went away.
Woo-hoo, this is my 100th post in this blog!