I recently adopted an existing ASP.NET 3.5 web form application that was upgraded to .NET 4 last year (and it works fine) and configured it to also run ASP.NET MVC3 after Scott Hanselman's blog post: ASP.NET Integration MVC 3 into existing updated ASP.NET 4 Web Forms applications . It works well, and I have successfully started to introduce Razor based views, and existing aspx pages continue to work.
However, one thing that has stopped working is the custom HttpHandler (our load balancer gets to a specific address to make the application accessible - a handler for that address). Web.config always declared a handler in the
system.web section as follows:
<httpHandlers> <add verb="*" path="system/heartbeat.aspx" type="My.Monitor.HttpHandlers.LoadBalancerHandler, My.Monitor"/> </httpHandlers>
Now we are testing post-MVC3, and I get an exception that states:
The controller for the path '/system/heartbeat.aspx' was not found or does not implement IController.
I have defined the RegisterRoutes method in my Global.asax and this method is called from Application_Start . In RegisterRoutes , I have IgnoreRoute ads from the Hanselman blog:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
which, as I thought, did not allow the routing system to accept anything with the .aspx extension.
I can reproduce the problem in VS2010 during debugging, and IIS 6 works in the deployment environment.
What can I do so that the routing system does not try to process this address, so that the user exit can do this? Any help is appreciated.
source share