简体   繁体   English

HTTP错误404.17 - 未找到请求的内容似乎是脚本,静态文件处理程序不会提供

[英]HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler

I purchase hosting from bigrock When I run simple aspx page this error occured 我从bigrock购买托管当我运行简单的aspx页面时出现此错误

HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler. HTTP错误404.17 - 未找到请求的内容似乎是脚本,静态文件处理程序不会提供。 Detailed Error Information Module StaticFileModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x80070032 Requested URL http://demo.com:80/demo/default.aspx Physical Path C:\\Inetpub\\vhosts\\demo.com\\httpdocs\\demo\\default.aspx Logon Method Anonymous Logon User Anonymous Most likely causes: 详细错误信息模块StaticFileModule通知ExecuteRequestHandler处理程序StaticFile错误代码0x80070032请求的URL http://demo.com:80/demo/default.aspx物理路径C:\\ Inetpub \\ vhosts \\ demo.com \\ httpdocs \\ demo \\ default.aspx登录方法匿名登录用户匿名最有可能导致:

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.

This is because .Net isn't configured correctly in IIS. 这是因为IIS中未正确配置.Net。

I ran into this in Windows Server 8 under IIS - Even after installing .Net 3.5 (and hence 2.0) IIS wasn't configured properly - So the static file handler was trying to handle .aspx requests - Resulting in this error. 我在IIS下的Windows Server 8中遇到过这种情况 - 即使在安装.Net 3.5(以及2.0)后,IIS配置不正确 - 因此静态文件处理程序试图处理.aspx请求 - 导致此错误。

The fix is simple: 修复很简单:

Launch Command Prompt - Start - cmd.exe cd C:\\Windows\\Microsoft.NET\\Framework64[Dot Net Version] aspnet_regiis -ir You should see output like: 启动命令提示符 - 启动 - cmd.exe cd C:\\ Windows \\ Microsoft.NET \\ Framework64 [Dot Net Version] aspnet_regiis -ir您应该看到如下输出:

Start installing ASP.NET [Dot Net Version]. 开始安装ASP.NET [Dot Net Version]。 ................ Finished installing ASP.NET [Dot Net Version]. ................完成安装ASP.NET [Dot Net Version]。

At this point if you refresh your page it should work properly. 此时如果刷新页面,它应该可以正常工作。

The fix for us was to manually edit the system.webServer/handlers in the IIS configuration editor and replace .NET 2 ISAPI module with .NET 4 ISAPI module . 我们的修复是在IIS配置编辑器中手动编辑system.webServer/handlers ,并用.NET 4 ISAPI模块替换.NET 2 ISAPI模块

applicationHost.config Before ( system.webServer/handlers ) applicationHost.config Before( system.webServer/handlers

<add name="AboMapperCustom-396397" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" />

applicationHost.config After ( system.webServer/handlers ) applicationHost.config之后( system.webServer/handlers

<add name="AboMapperCustom-356384" path="*" verb="*" modules="IsapiModule" scriptProcessor="c:\windows\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" requireAccess="None" responseBufferLimit="0" />

Essentially it was running the application through the wrong ISAPI module - even though we specified it properly in the App Pool. 基本上它是通过错误的ISAPI模块运行应用程序 - 即使我们在应用程序池中正确指定它。

We also had to enable the .NET 4 ISAPI module - it had been turned off by a previous admin. 我们还必须启用.NET 4 ISAPI模块 - 它已由之前的管理员关闭。

Alternate Solution - Application Pool Misconfigured 备用解决方案 - 应用程序池配置错误

We also see this same error when a .NET 2.0 Application ( Classic mode ) is serving up .NET 4 ( Integrated mode ) content. 当.NET 2.0应用程序( 经典模式 )提供.NET 4( 集成模式 )内容时,我们也会看到同样的错误。 Switching the Application Pool from v2.0 to v4.0 fixed the issue. 应用程序池v2.0切换到v4.0解决了该问题。 This same issue could also be from Application Pools v1.1 misclassified as v2.0 . 同样的问题也可能来自Application Pools v1.1错误分类为v2.0

A better solution to this issue is generally the following: 这个问题的更好解决方案通常如下:

WCF mapping are not registered with IIS. WCF映射未在IIS中注册。 Navigate to 导航

"C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation" and execute 

"servicemodelreg -i" to install them manually.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS 8.0 HTTP错误404.17-找不到请求的内容似乎是脚本,并且不会由静态文件处理程序提供 - IIS 8.0 HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler WCF:解除对本地iis的解析后未找到HTTP 404.17 - WCF: HTTP 404.17 NOT FOUND after depyloing to local iis .asmx文件的HTTP处理程序抛出401错误 - http handler for .asmx file is throwing 401 error 自定义文件扩展名的HTTP处理程序和404错误 - HTTP Handler and 404 error for a custom file extension 是什么导致显示 WCF 错误 404.17? - What causes WCF Error 404.17 to be shown? 远程处理错误:找不到请求的服务 - Remoting Error: Requested Service Not Found JW Player无法显示通过文件处理程序(.ashx)提供的flv - JW Player unable to display flv served via File Handler (.ashx) 网站尝试访问数据库或任何其他站点时,出现“ HTTP错误404。找不到请求的资源。” - “HTTP Error 404. The requested resource is not found.” when website tries to access database or any other site 无法将输入的xml文件内容转换为数据集。 找不到要求的值&#39;ConnectionStrings&#39; - Unable to convert input xml file content to a DataSet. Requested value 'ConnectionStrings' was not found 使用jquery和handler(ashx)在上传文件中“找不到”错误 - 'Not found' error in upload file using jquery and handler(ashx)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM