Modi
Modi

Reputation: 113

How to check if a request for static file is passing through ASP.NET pipeline in ASP.NET MVC

I would like to know if there is any way I can check if the request for static files like images/css etc is handled from asp.net pipeline or not.

I have set runAllManagedModules=false in web.config and added ignore routes as well. The load times have come down. Which indicates that the requests are probably not passing through the asp.net pipeline.

However, is there a way I can ascertain the same?

Browsers i Used: IE/ Firefox

Upvotes: 1

Views: 1328

Answers (1)

Andrei
Andrei

Reputation: 44580

If request goes through ASP.NET request pipeline, it should call all the registered http-modules.

  1. Add custom http-module (if you don't have one).
  2. Put breakpoint inside.
  3. Run app in debug mode.
  4. Initiate request of any static content.

If breakpoint is reached, request probably goes through ASP.NET pipeline. To make sure, you can check the url of the request in debug mode.

Upvotes: 1

Related Questions