[英]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模块 。
system.webServer/handlers
) 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" />
system.webServer/handlers
) 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模块 - 它已由之前的管理员关闭。
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.