Mvc route classic asp pages

SleepyMushroom

New Member
I am converting an asp classic (.asp) to mvc4. The site is fine, but when I try to map the legacy pages to the new routes it fails big time.I just want to : default.asp to / or pageA.asp to /NewPageAWhen I try to map the old pages , looks like the asp classic handler intercepts first the request and try to find the page .asp, but as doesn't exist, it throws 404 error.I am mapping wrong ? my mapping is like this:\[code\]routes.MapRoute("DefaultOld", "default.asp", new { controller = "Home", action = "IndexOld" });routes.MapRoute("MenuOld", "menu.htm", new { controller = "Home", action = "IndexOld" });routes.MapRoute("RecepcaoOld", "recepcao.htm", new { controller = "Home", action = "IndexOld" });routes.MapRoute("EntradaPorOld", "entrada_por.htm", new { controller = "Home", action = "IndexOld" });\[/code\]Is possible to tell the server to ignore the classic pages and let the mvc route to intercepts the request and act as it should ?I am using IIS 7.I tried this solution here (http://blog.abodit.com/2010/04/a-simple-redirect-route-handler-for-asp-net-3-5-routing/), works fine to map tp aspx pages, but when I try to use with asp or htm, it doesn't work at all. So I think I need t disable the handler od classic asp, is that correct ? but in the htm side, the StaticHandler if I disable it, the images and all static resources would not work well, correct ?cheers
 
Back
Top