I am trying to upload an ASP.NET MVC application in a shared server running on IIS 6 and Windows 2003. I don’t have access to IIS. I’ve changed the global.asax.cs file as follows:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}.aspx/{action}/{id}",
new { action = "Index", id = "" }
);
routes.MapRoute(
"Root",
"",
new { controller = "Home", action = "Index", id = "" }
);
It is working fine, but it doesn’t drop the .aspx at the end of the controller. Is there a way to remove the .aspx extension in the URL?
As far as I know you’re URI’s should work off the bat providing you are on IIS7.
If you are on IIS6 however you will need to jump through some hoops to get extensionless URI’s.
This guide may help – haacked.
As far as I can tell though you’ll need access to handler mappings in IIS6, which you probably won’t have on your shared host.