I’m not sure if this has been asked already. Well, here is my problem.
I have a classic Web Forms site that I’m trying to turn into hybrid-MVC. That is, all new functionality would be MVC. However, we have a custom HTTP handler that takes care of our darn-friendly URLs and which we are not planning on changing. My problem right now is adding our existing urls as ignore routes. I do not want to add all (the 1000s) of them as exceptions in the Application_Start(). Adding a custom http module that would site on top of MVC and our existing custom handler seemed to be a feasible solution. This module would essentially route requests by checking against an XML file (of existing routes) and decide whether MVC or MyHandler would process the request.
Anybody tried this? I’m having trouble offloading the request to the appropriate handler.
The best way to accomplish this is to convert your HttpHandler into an HttpModule and make sure that all requests pass through your custom module before being handed off to MVC. Since MVC is implemented as a module, it will always intercept your requests before the reach your handler.