Combres.axd在WebForms应用中返回404 [英] Combres.axd returns 404 in WebForms app

查看:84
本文介绍了Combres.axd在WebForms应用中返回404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have 2 ASP.NET apps, 1 WebForms and 1 MVC. Combres worked beautifully for both while working locally on IIS Express. After deploying both apps to the test server (IIS 7, both apps are in the same web site in IIS) the combres.axd link referenced in the pages of the WebForms app is returning a 404, while the MVC app works fine.

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

I hooked up the the WebForms app to my local IIS as well and it again worked fine.

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

I looked at the modules and handlers between my local IIS, the MVC app and the WebForms app and the routing registrations appear to be the same.

如果我将defaultDebugEnabled = true设置为

If I set defaultDebugEnabled="true" then it generates a script tag for each script in the resource set and works fine.

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

Any ideas how to debug the 404 from combres.axd?

推荐答案

将其跟踪到web.config中的模块配置:

Tracked it down to the modules config in web.config:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

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

I am working with a legacy WebForms app that was created around .NET 3.0/3.5, so I did not have the runAllManagedModulesForAllRequests attribute set. I see in the latest Visual Studio 2010 ASP.NET WebForms template, this is now the default.

我还找到了 post ,它建议使用一种不太暴力的方法来获取UrlRoutingModule来捕获combres.axd路由。

I also found a post that suggests a less brute force method to get the UrlRoutingModule to catch the combres.axd route.

<system.webServer>
    <modules>
        <remove name="UrlRoutingModule-4.0" />
        <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
    </modules>
</system.webServer>

其中一项评论提到了此更新,但我尚未对其进行测试:

One of the comments mentioned this update, I haven't tested it yet though:

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

这篇关于Combres.axd在WebForms应用中返回404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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