Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MapRequestHandler - 404.0 Error when routing .html from .aspx in IIS 8.0

Tags:

html

asp.net

iis

I am using URL Rewriting in Asp.net framework 4.0 and I am replacing aspx with an html extension (i.e. I am using routing like Login.aspx as Login.html). But it is showing error a 404 (not found) error. In short, URL Rewriting with .html extension is not working on IIS 8.0. Without .html (like Login.aspx with login), it is working fine.

Check this :

  • theprojectjugaad.com/Login.html (404.0 error)

  • theprojectjugaad.com/Register (Working fine)

Please help me to solve this.

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")));
}
like image 878
Jeeten Parmar Avatar asked Nov 28 '15 13:11

Jeeten Parmar


1 Answers

Changing the Application Pool from Classic to Integrated fixed the issue.

like image 73
Jeeten Parmar Avatar answered Oct 15 '22 18:10

Jeeten Parmar