我使用的平台是win7旗舰版+IIS7.0,目前显示静态页面没事,但是一旦有动态页面就会显示如下错误信息:
错误摘要:
HTTP 错误 500.19 - Internal Server Error
web.config 文件的 system.webServer/httpErrors 节中不允许绝对物理路径“G:\websites”。请改用相对路径。
详细错误信息:
模块 CustomErrorModule 通知 SendResponse
处理程序 ASPClassic 错误代码 0x8007000d
请求的 URL http://127.0.0.1:80/liuyanban/Default.asp 物理路径 G:\websites\liuyanban\Default.asp
登录方法 匿名 登录用户 匿名
最可能的原因:
•工作进程无法读取 applicationhost.config 或 web.config 文件。
•applicationhost.config 或 web.config 文件中存在格式错误的 XML。
•由于 NTFS 权限不正确,服务器无法访问 applicationhost.config 或 web.config 文件。
解决方法
从能运行的站点的web.config文件拷贝<webserver>节点内容替换出错站点内的web.config文件的<webserver>节点
我在做的时候把asp里的
<system.webServer>
<defaultDocument>
<files>
<remove value="default.aspx" />
</files>
</defaultDocument>
<!--<httpErrors>
<remove statusCode="500" subStatusCode="-1" />
<error statusCode="500" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="500-100.asp" responseMode="File" />
</httpErrors>-->
<directoryBrowse enabled="true"/>
</system.webServer>
这部分去掉了:
<!--<httpErrors>
<remove statusCode="500" subStatusCode="-1" />
<error statusCode="500" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="500-100.asp" responseMode="File" />
</httpErrors>-->