系统日志有以下的错误信息:
错误: 应用程序池 'DefaultAppPool' 的模板永久性缓存初始化失败,这是由下列错误所导致: 无法创建应用程序池的磁盘缓存子目录。数据可能包含额外的错误代码。
Windows Server 2003 无法创建应用程序池的磁盘缓存子目录的解决办法
处理方式:给下列三个目录授予IIS_WPG及Service用户的读写权限:
• systemroot\Help\IISHelp\Common
• systemroot\System32\Inetsrv\ASP Compiled Templates
• systemroot\IIS Temporary Compressed Files
• %systemroot%HelpIISHelpCommon IIS_WPG和NETWORK SERVICE 读取和运行权限
• %systemroot%System32InetsrvASP Compiled Templates 两者完全控制权限
• %systemroot%IIS Temporary Compressed Files 两者完全控制权限
参考一:
自从公司服务器升级为域控制模式以后,发现IIS上运行一些ASP的应用程序时,会时不时出现类似下面这样的错误信息:
错误: 应用程序池 'DefaultAppPool' 的模板永久性缓存初始化失败,这是由下列错误所导致: 无法创建应用程序池的磁盘缓存子目录。数据可能包含额外的错误代码。
经查询相关资料后发现这个错误是IIS运行权限的问题,处理方法是更改IIS运行时用的两个帐户:IIS_WPG 和 NETWORK SERVICE 对应用程序池用到的相关目录的NTFS权限,将IIS_WPG帐户设置为读取与执行、列出文件夹目录、读取,而NETWORK SERVICE则需要完全控制权限。 (此话不完全正确)
要配置的相关目录有以下几个:
• %systemroot%HelpIISHelpCommon
• %systemroot%System32InetsrvASP Compiled Templates
• %systemroot%IIS Temporary Compressed Files
附:%systemroot%通常指C:Windows,如果你是从Win 2K Server升级到2003,则是C:Winnt。如果你自定义了系统目录,是根据实际情况调整这个变量的值。
完成后,重启一下IIS Admin服务,即可解决此问题。
参考二:
错误: 应用程序池 'DefaultAppPool' 的模板永久性缓存初始化失败,这是由下列错误所导致: 无法创建应用程序池的磁盘缓存子目录。数据可能包含额外的错误代码。解决方法(详细步骤):http://support.microsoft.com/?kbid=842493
You receive a "Service Unavailable" error message when you browse an IIS 6.0 Web page on a Windows Server 2003-based domain controller
View products that this article applies to.
Article ID : 842493
Last Review : September 2, 2004
Revision : 1.2
SYMPTOMS
When you browse a Web page that is hosted on a Microsoft Windows Server 2003-based domain controller, you may receive the following Active Server Pages (ASP) Error 5 error message:
Service Unavailable
Additionally, the following warning event may be logged in the system event log:
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1009
Date: Date
Time: Time
User: N/A
Computer: Computer_Name
Description:
A process serving application pool 'Application_Pool_Name' terminated unexpectedly. The process id was '5288'. The process exit code was '0xffffffff'.
For more information, see Help and Support Center at
Additionally, the following error event may be logged in the application event log:
Event Type: Message
Event Source: Active Server Pages
Event Category: None
Event ID: 5
Date: Date
Time: Time
User: N/A
Computer: Computer_Name
Description:
Error: The Template Persistent Cache initialization failed for Application Pool 'Application_Pool_Name' because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes.
For more information, see Help and Support Center at
When you use Filemon to monitor file activity, you receive an error message that is similar to the following:
3521 Time w3wp.exe:3168 CREATE C:WINDOWSsystem32inetsrvASP Compiled TemplatesPID3168.TMP ACCESS DENIED NT AUTHORITYNETWORK SERVICE
CAUSE
This issue may occur if the server that is running Microsoft Internet Information Services (IIS) 6.0 is also a domain controller. The problem occurs because the Application pool is using the NT AuthorityNetwork Service account, and the NT AuthorityNetwork Service account may not have permissions to access the required folders.
RESOLUTION
To resolve this problem, manually set permissions on the folders for the IIS_WPG group, and then set permissions on the folders for the NT AuthorityNetwork Service account.
To set permissions on the folders for the IIS_WPG group, follow these steps: 1. Start Windows Explorer, and then open the following folder:
%systemroot%HelpiisHelp
2. In the right pane, right-click the Common folder, and then click Sharing and Security.
3. Click the Security tab, click Add, type IIS_WPG, and then click OK.
4. With IIS_WPG selected, click to select the following check boxes under the Allow column, and then click OK: Read and Execute
List Folder Contents
Read
5. Open the following folder:
%systemroot%system32inetsrv
6. In the right pane, right-click the ASP Compiled Templates folder, and then click Sharing and Security.
7. Click the Security tab, click the IIS_WPG group, and then click to select the Full Control check box under the Allow column. Click OK.
8. Open the following folder:
%systemroot%
9. In the right pane, right-click the IIS Temporary Compressed folder, and then click Sharing and Security.
10. Click the Security tab, click the IIS_WPG group, and then click to select the Full Control check box under the Allow column. Click OK.
To set permissions on the folders for the NT AuthorityNetwork Service account, follow these steps: 1. Start Windows Explorer, and then open the following folder:
%systemroot%HelpiisHelp
2. In the right pane, right-click the Common folder, and then click Sharing and Security.
3. Click the Security tab, click Add, type NETWORK SERVICE, and then click OK.
4. With NETWORK SERVICE selected, click to select the following check boxes under the Allow column, and then click OK: Read and Execute
List Folder Contents
Read
5. Open the following folder:
%systemroot%system32inetsrv
6. In the right pane, right-click the ASP Compiled Templates folder, and then click Sharing and Security.
7. Click the Security tab, click Add, type NETWORK SERVICE, and then click OK.
8. With the NETWORK SERVICE group selected, click to select the Full Control check box under the Allow column, and then click OK.
9. Open the following folder:
%systemroot%
10. In the right pane, right-click the IIS Temporary Compressed folder, and then click Sharing and Security.
11. Click the Security tab, click Add, type NETWORK SERVICE, and then click OK.
12. With the NETWORK SERVICE group selected, click to select the Full Control check box under the Allow column, and then click OK.
After you have completed these steps, restart the IIS Admin service from the Services snap-in or from the Computer Management snap-in.
WORKAROUND
You may be able to temporarily work around this problem by restarting the IIS Admin service from the Services snap-in or from the Computer Management snap-in.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INformATION
For additional information about a similar issue with a different cause, click the following article number to view the article in the Microsoft Knowledge Base:
332097 (http://support.microsoft.com/kb/332097/) DCPROMO does not retain permissions on some IIS folders