I have a .net 4.0 web application running like a charm on my local computer and an old web server. Both computers use the classic .net 4.0 application pool without any problems.
But when I switched to the new web server, it gave a 404 error instead of rewriting the urls. I created the new application as simple as possible. It rewrites all the request paths to default.aspx, as shown below:
Global.asax.cs
protected void Application_BeginRequest(object sender, EventArgs e)
{
Context.RewritePath("default.aspx", false);
}
I can access default.aspx if I make a direct request to the file, but when I make a request to the address except for 'default.aspx', I get a 404 error from the static file handler.
Do you have an idea how I can fix this?
Full size image here
