当获得新配置的 Windows 7 机器时,我注意到 ASP.NET 默认情况下处于关闭状态。经典 ASP 也是如此。我收到 Web 应用程序的 404.17 错误。我认为这是因为我没有“aspx”MIME 类型。虽然这只是一个猜测。当我在“控制面板”>“程序和功能”>“打开或关闭 Windows 功能”下打开它们并重新启动 Windows 7 计算机时,MIME 类型从未显示。有人可以检查 *.aspx 页面的 MIME 类型,并告诉我编辑模式下的配置吗?对于 ASP.NET 扩展,我会缺少哪些其他 MIME 类型(即:ashx、asax 等)?配置它们的最佳方法是什么?
Error Summary
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
...
Module: StaticFileModule
Notification: ExecuteRequestHandler
Handler: StaticFile
Error Code: 0x80070032
Requested URL: ...
Physical Path: ...
Logon Method: NTLM
Logon User: {DOMAIN}\{WINDOWS LOGIN}
...
Most likely causes:
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
...
Things you can try:
If you want to serve this content as a static file, add an explicit MIME map.
Fix:
点击服务器后我选择了“ISAPI & CGI Restrictions”
在 IIS 管理器中输入名称(不是站点名称),然后右键单击
“ASP.NET v4.0.30319”行并选择“允许”。
从“程序和功能 > 打开或关闭 Windows 功能”打开 ASP.NET 后,必须从 Windows 命令提示符安装 ASP.NET。 MIME 类型永远不会显示,但执行此命令后,我注意到这些扩展显示在 IIS 管理器的 IIS 网站“处理程序映射”部分下。
C:\>cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>dir aspnet_reg*
Volume in drive C is Windows
Volume Serial Number is 8EE6-5DD0
Directory of C:\Windows\Microsoft.NET\Framework64\v4.0.30319
03/18/2010 08:23 PM 19,296 aspnet_regbrowsers.exe
03/18/2010 08:23 PM 36,696 aspnet_regiis.exe
03/18/2010 08:23 PM 102,232 aspnet_regsql.exe
3 File(s) 158,224 bytes
0 Dir(s) 34,836,508,672 bytes free
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i
Start installing ASP.NET (4.0.30319).
.....
Finished installing ASP.NET (4.0.30319).
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>
但是,我仍然收到此错误。但如果你按照我提到的“修复”操作,这个问题就会消失。
HTTP Error 404.2 - Not Found
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)