gpt4 book ai didi

asp.net - ASP.NET 的 IIS 7 中缺少 MIME 类型 - 404.17

转载 作者:行者123 更新时间:2023-12-02 08:43:09 39 4
gpt4 key购买 nike

当获得新配置的 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.

最佳答案

修复:

I chose the "ISAPI & CGI Restrictions" after clicking the server name (not the site name) in IIS Manager, and right clicked the "ASP.NET v4.0.30319" lines and chose "Allow".

从“程序和功能 > 打开或关闭 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.

关于asp.net - ASP.NET 的 IIS 7 中缺少 MIME 类型 - 404.17,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11319311/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com