Linux / PHP / Java / Designer

As melhores dicas estão aqui.

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

| 3 Comentários

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.

 

3 Comments

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

  2. I like the valuable info you provide in your articles.
    I will bookmark your blog and check again here
    frequently. I am quite sure I’ll learn many new stuff right here! Good luck for the next!

Deixe uma resposta

Campos requeridos estão marcados *.