Linux / PHP / Java / Designer

As melhores dicas estão aqui.

ASP-NET-4-URL-Routing-Default-Page

| 1 Comentário

ASP.NET

Problem

I was implementing ASP.NET routing features for one of the web application. The code was working correctly in the development environment. Then I deployed it to staging server, navigate to http://mydomain.com/ and received the error
"404 File Not Found".
I tried to include routes.MapPageRoute("Default", "/", "~/Default.aspx"); in the global.asax file but I received another error
"The route URL cannot start with a '/' or '~' character and it cannot contain a '?' character.Parameter name: routeUrl".
After several trials and errors, I found out that we should leave the "URL with parameters" empty. See below.

routes.MapPageRoute("Default", "", "~/Default.aspx");

I hope you all will find this information useful.

 

One Comment

  1. Heck of a job there, it absuoltley helps me out.

Deixe um Comentário

Campos requeridos estão marcados *.

*