首页 新闻 会员 周边

web.config中的<staticContent>引起的HTTP Error 500.19 - Internal Server Error

0
[已关闭问题] 关闭于 2011-09-15 18:38

web.config中增加staticContent的设置:

<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00.03:00:00"/>
</staticContent>
</system.webServer>
</configuration>

通过浏览器访问,出现下面的错误:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

3:
<system.webServer>
4:
<staticContent>
5:
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00.03:00:00
dudu的主页 dudu | 高人七级 | 园豆:30994
提问于:2011-09-15 18:33
< >
分享
所有回答(1)
0

解决方法:

在命令行下运行下面的命令:

%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/staticContent
Unlocked section "system.webServer/staticContent" at configuration path "MACHINE/WEBROOT/APPHOST".

dudu | 园豆:30994 (高人七级) | 2011-09-15 18:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册