I use Rewriting URL in Asp.net framework 4.0 and I replace aspx with html extension (i.e. use routing like Login.aspx like Login.html). But it displays error 404 (not found). In short, URL rewriting with the .html extension does not work on IIS 8.0. Without .html (e.g. Login.aspx with login), it works fine.
Check this:
Please help me solve this problem.
Global.asax
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); } private static void RegisterRoutes() { System.Web.Routing.RouteTable.Routes.Add( "Login", new System.Web.Routing.Route("Login.html", new DisplayRouteHandler("~/Login.aspx"))); }
source share