开发者

Application_BeginRequest called for images

I've seen a few posts about Application_BeginRequest, but non seems to have my problem.

My Application_BeginRe开发者_如何学JAVAquest is being called for every image in my website.

The StaticFileHandler is enabled with * as the Path, but it's at the end of the list.

Is this the normal behaviour? Or should I add .gif, .jpg and so on on top of the list?

This is on my IIS7.5 Win7 Development Server. Didn't check it on the production server yet.

Update: Setting runAllManagedModulesForAllRequests="false" would help. But then the ASP.NET URL Mapping does not work anymore. I tried disable it just for the image directly, but that had no effect?

<location path="Resources">
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="false">
    </modules>
  </system.webServer>
<location>


make sure this value is false in your web.config.

<modules runAllManagedModulesForAllRequests="false">

if you are running an MVC app I'd suggest looking at this post

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜