3

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?.

  • Okay I fixed this problem by overriding the Application_BeginRequest method in Global.aspx.cs file and rewriting the HttpContext path to include "Default.aspx" page if the current request is a root request. – Vijay Rayapati Nov 29 '09 at 12:09

1 Answers1

0

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

m3kh
  • 7,881
  • 2
  • 31
  • 37