There is a heavy mvc application and many styles, scipts, images into the every page.
But the HttpApplication processes an every request to the server including requests for .css, js, img. I assume it spends resources.
Can I turn off that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Some of the other responses are a bit misleading so I’ll chime in.
The setting that controls this behavior is the
runAllManagedModulesForAllRequestsattribute located in theconfiguration\system.webServer\modulessection of your Web.config file. Every MVC project template has that set to true by default. You could set it to false to disable the behavior.However, note that this might cause your routes to stop working. That’s because on earlier versions of IIS this setting was required to make routing work with extenionless URLs. Without this setting IIS used to treat such requests as if they referred to folders and would bypass the managed pipeline altogether. This setting forces IIS to run all managed modules for all requests (as the name of the setting eloquently implies), thus giving URL routing a chance to respond.
In Windows Server 2008 R2 SP1 (or other OS’s that have KB980368 installed) this setting is no longer necessary.
So depending on the configuration of your servers you might be able to turn it off, but you should certainly test first to verify your application will continue to work.