HTTP 错误 500.0 - Internal Server Error
Internal Server Error
最可能的原因:
- IIS 收到了请求;但在处理请求过程中出现内部错误。此错误的根本原因取决于处理该请求的是哪一个模块以及出现此错误时工作进程中出现了何种情况。
- IIS 无法访问网站或应用程序的 web.config 文件。如果 NTFS 权限设置不正确,便会出现这种情况。
- IIS 无法处理网站或应用程序的配置。
- 已经过身份验证的用户没有使用此 DLL 的权限。
- 该请求将被映射到托管处理程序,但不会安装 .NET 可扩展功能。
可尝试的操作:
- 确保 web.config 文件的 NTFS 权限正确,并允许访问 Web 服务器的计算机帐户。
- 检查事件日志中是否记录了任何附加信息。
- 确认 DLL 的权限。
- 如果请求被映射到托管处理程序,则安装 .NET 可扩展功能。
- 创建跟踪规则以跟踪此 HTTP 状态代码的失败的请求。有关为失败的请求创建跟踪规则的详细信息,请单击此处。
详细错误信息:
模块 | ManagedPipelineHandler |
通知 | ExecuteRequestHandler |
处理程序 | HtmlFileHandler-Integrated-4.0 |
错误代码 | 0x800703e9 |
请求的 URL | http://192.168.1.181:8012/SpreadOrg/kyzy/mb/index.html |
物理路径 | D:\projects\quanxi\BailiV2\Presentation\BrnMall.Web\SpreadOrg\kyzy\mb\index.html |
登录方法 | 匿名 |
登录用户 | 匿名 |
详细信息:
此错误表明在处理请求时出现问题。Web 服务器收到了请求,但在处理过程中出现错误,导致 500 错误。
查看详细信息 »
Microsoft 知识库文章:
- 294807
检查网站根目录 Web.config
找到<system.webServer>节点下的 <handlers>节点
<add name="HtmlFileHandler-ISAPI-4.0_32bit" path="*.html" verb="GET,POST" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="HtmlFileHandler-ISAPI-4.0_64bit" path="*.html" verb="GET,POST" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="HtmlFileHandler-Integrated-4.0" path="*.html" verb="GET,POST" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
有这么一段代码配置,
注释掉这点代码后访问正常
解决
*先把刚才网站根目录下的Web.config,注释的代码取消注释
例如我的目录是 网站根目录>SpreadOrg>index.html
我访问这个目录报错,
只需要在SpreadOrg目录下放一个Web.config
内容如下
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="HtmlFileHandler-ISAPI-4.0_32bit" />
<remove name="HtmlFileHandler-ISAPI-4.0_64bit" />
<remove name="HtmlFileHandler-Integrated-4.0" />
</handlers>
</system.webServer>
</configuration>