Combres.axd在WebForms应用中返回404

Rya*_*anW 5 asp.net routing webforms combres

我有2个ASP.NET应用程序,1个WebForms和1个MVC。当在IIS Express上本地工作时,Combrs两者的工作都非常漂亮。将两个应用程序都部署到测试服务器(IIS 7,两个应用程序都在IIS的同一网站中)之后,WebForms应用程序页面中引用的combres.axd链接返回404,而MVC应用程序运行良好。

我也将WebForms应用程序也连接到了本地IIS,并且再次正常运行。

我查看了本地IIS,MVC应用程序和WebForms应用程序之间的模块和处理程序,并且路由注册似乎相同。

如果我设置defaultDebugEnabled =“ true”,那么它将为资源集中的每个脚本生成一个脚本标记,并且可以正常工作。

有什么想法如何从combres.axd调试404吗?

Rya*_*anW 3

追踪到 web.config 中的模块配置:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)

我正在使用围绕 .NET 3.0/3.5 创建的旧版 WebForms 应用程序,因此我没有设置 runAllManagedModulesForAllRequests 属性。我在最新的 Visual Studio 2010 ASP.NET WebForms 模板中看到,这是现在的默认模板。

我还发现了一篇文章,建议使用一种不太暴力的方法来让 UrlRoutingModule 捕获 Combres.axd 路由。

<system.webServer>
    <modules>
        <remove name="UrlRoutingModule-4.0" />
        <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
    </modules>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)

评论之一提到了此更新,但我还没有测试过:

http://support.microsoft.com/kb/980368