Does the handler for MVC Routes trump the HttpModules defined in web.config
?
I have an asp.net app that consists of legacy webforms code and MVC code. I want to prove to myself that MVC is taking precedence for handling requests over a custom HttpModule the project uses, which can also handle requests.
IIRC the MVC routing is done in the HTTP module which launches MVC. So MVC will "win" as long as it's http module is added before your custom one.
I was almost correct. MVC implements a UrlRoutingHandler which means that it will direct the request before any module is invoked.
Source code: