1

我正在考虑将其发布到哪个部分,但我想我来对了地方。如果我错了,请先道歉!

我有一个 Windows Server 2008,托管一个小型 ASP.NET Web 应用程序 (IIS7) 已经快一年了。在这一年中,我注意到在看似随机的页面上,我自己和其他人会随机收到 404 Forbidden / Access is denied 错误。

每次,解决方案都是在托管 ASP.NET Web 应用程序的 Windows Server 2008 机器上运行 Windows 更新。

在类似的问题上,我看到建议runAllManagedModulesForAllRequests="true"在 web.config 中设置将解决 404 问题。

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"></modules>
    <handlers>
      <remove name="UrlRoutingHandler"/>
    </handlers>
  </system.webServer>

我的 Windows Server 2008 上的 Windows 更新导致我的 ASP.NET Web 应用程序出现此 404 问题的原因是什么?另外,这段代码能解决我的问题吗?当然很多人会说要测试一下,但错误很少见,可能需要一周、一个月/几个月的时间才会出现。

4

2 回答 2

2

对于真正的修复,请应用此热修复:

http://hotfixv4.microsoft.com/Windows%207/WindowsServer%202008%20R2/sp1/Fix305889/7600/free/407288_intl_x64_zip.exe

在此处阅读有关问题/解决方案的信息

本文介绍了使某些 Internet 信息服务 (IIS) 7.0 或 IIS 7.5 处理程序能够处理其 URL 不以句点结尾的请求的更新。具体来说,这些处理程序被映射到“ .”。请求路径。当前,映射到“ .”的处理程序。请求路径仅处理 URL 以句点结尾的请求...

runAllManagedModulesForAllRequests="true" 是个坏主意。

于 2013-12-16T21:02:48.447 回答
0

I have the same problem trying to install the hotfix(s). I went here: http://support.microsoft.com/kb/980368 and updated the webconfig that is noted and that corrected my issue with the 404

于 2014-03-12T16:00:48.200 回答