开发者

Combres.axd returns 404 in WebForms app

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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜