R – ASP.NET URL Routing on root in IIS 6.0

asp.netasp.net-routingurl-routing

I enabled a routing on ASP.NET web application running IIS 6.0 using

RouteTable.Routes.MapPageRoute("Simple", "{testvalue}", "~/Test.aspx"); in Global.aspx.cs

This works fine when I use http://www.MyDomain.com/Hello, however when I use http://subdomain.mydomain.com instead of loading the configured default page (default.aspx), it tries to route the request and sending to login.aspx page as we use Forms Authentication.

Any suggestions on how to enable routing at root directory?.

Best Answer

If you have Default.aspx on the root of your application. Thus, Set the RouteTable.Routes.RouteExistingFiles to false.

Related Topic