Combres.axd returns 404 in WebForms app

不打扰是莪最后的温柔 提交于 2019-12-06 03:29:13

问题


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.

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

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.

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

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


回答1:


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

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

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.

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



来源:https://stackoverflow.com/questions/7535333/combres-axd-returns-404-in-webforms-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!