IIS7 Integrated Mode - Auth Workarounds for Static Files

I have an ASP.NET MVC application for IIS7 using forms authentication in integrated mode. I notice that ASP.NET runtime hits every request that arrives, even if it is only for static files (possibly due to native mode). Is there a way to configure IIS7 to serve static files without getting into ASP.NET?

I thought the only way is to create a separate virtual directory for static files only - a mini CDN if you do.

Any other ideas?

+4
source share
1 answer

To avoid using the HttpModule for static files, configure it in web.config to use preCondition="managedHandler" .

In case this helps, event handlers in Global.asax are not called for static files.

Also, keep in mind that all HttpModules are called for all files when you test Cassini.

+1
source

All Articles