MIME类型在IIS 7中失踪ASP.NET - 404.17 [英] MIME types missing in IIS 7 for ASP.NET - 404.17

查看:1948
本文介绍了MIME类型在IIS 7中失踪ASP.NET - 404.17的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当得到一个新配置的Windows 7中,我注意到ASP.NET是默认关闭的。所以是经典的ASP。我得到一个错误404.17为Web应用程序。我想这是因为我没有一个ASPXMIME类型。虽然这只是一个猜测。当我把他们下控制面板>程序和功能>打开Windows功能打开或关闭,并重新启动我的Windows 7机器的MIME类型始终没有露面。可有人检查什么MIME类型,他们对* .aspx页,并告诉我在编辑模式下的配置?还有什么其他MIME类型,我会失踪ASP.NET扩展名(即:ASHX,ASAX,等...)?什么是配置他们所有的最好的方式?

 错误摘要
    HTTP错误404.17 - 未找到
    所请求的内容似乎是脚本,并不会由静态文件处理程序提供服务。...模块:StaticFileModule
通知:ExecuteRequestHandler
处理程序:StaticFile
错误code:0x80070032
请求的URL:...
物理路径:...
登录方法:NTLM
登录用户:{} DOMAIN \\ {Windows登录}...最可能的原因:请求匹配通配符MIME映射。该请求被映射到静态文件处理程序。如果有不同的$ P $对 - 的条件下,请求将映射到一个不同的处理程序。...您可以尝试:如果你想成为这个内容作为静态文件,添加一个明确的MIME映射。


解决方案

修正:


  

我选择了ISAPI和功放; CGI限制点击服务器后
  名称(不是网站名称)在IIS管理器,然后右键点击
  ASP.NET v4.0.30319行,并选择允许。


从开启后ASP.NET程序和功能>打开Windows功能打开或关闭,就必须从Windows命令提示符下安装ASP.NET。 MIME类型永远不要露面,但这样做的命令后,我注意到这些扩展的IIS网站下IIS管理器的处理程序映射部分出现了。

  C:\\> CD C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.30319C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.30319> DIR aspnet_reg *
 在驱动器C体积的Windows
 卷序列号是8EE6-5DD0 的C目录:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.303192010年3月18日下午8点23分19,296 aspnet_regbrowsers.exe
2010年3月18日下午8点23分36696 ASPNET_REGIIS.EXE
2010年3月18日下午8时23 102232 aspnet_regsql.exe的
               3文件(S)158224字节
               风向0(S)34836508672字节免费C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.30319> ASPNET_REGIIS.EXE -i
开始安装ASP.NET(4.0.30319)。
.....
完成安装ASP.NET(4.0.30319)。C:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v4.0.30319>

不过,我仍然得到这个错误。但是,如果你做我的修正所提到的,这会自行消失。

  HTTP错误404.2  - 未找到
您请求的页面不能因为Web服务器上的ISAPI和CGI限制列表设置送达。

When getting a newly configured Windows 7 box, I noticed that ASP.NET was turned off by default. So was classical ASP. I was getting a 404.17 error for a web application. I think it's because I don't have an "aspx" MIME type. Although that's just a guess. When I turned them on under Control Panel > Programs and Features > Turn Windows Features on or off, and restarted my Windows 7 machine, the MIME types never showed up. Can someone check what MIME type they have for *.aspx pages, and tell me the configuration in edit mode? What other MIME types would I be missing for ASP.NET extensions (ie: ashx, asax, etc...)? What is the best way to configure them all?

    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:

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".

After turning on ASP.NET from "Programs and Features > Turn Windows features on or off", you must install ASP.NET from the Windows command prompt. The MIME types don't ever show up, but after doing this command, I noticed these extensions showed up under the IIS web site "Handler Mappings" section of IIS Manager.

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>

However, I still got this error. But if you do what I mentioned for the "Fix", this will go away.

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.

这篇关于MIME类型在IIS 7中失踪ASP.NET - 404.17的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆