ASP.NET Routing in Global.asax

Viewed 6310

I'm trying to add a route in my web forms application by following this:

http://msdn.microsoft.com/en-us/library/cc668201.aspx#adding_routes_to_a_web_forms_application

I've added the route in my Global.asax file like so:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.MapPageRoute("", "/WebsiteName/{combinedPin}", "~/Default.aspx");
}

I then try to visit my website locally like this:

http:// localhost:12345/WebsiteName/test36u

But I get a resource cannot be found message so I don't think my route is correct. Can anybody see a problem with my code?

Any pointers would be much appreciated.

Thanks

1 Answers
Related