开发者

ASP.NET URL Routing on root in IIS 6.0

开发者 https://www.devze.com 2022-12-13 03:44 出处:网络
I enabled a routing on ASP.NET web application running IIS 6.0 using Rou开发者_如何学运维teTable.Routes.MapPageRoute(\"Simple\", \"{testvalue}\", \"~/Test.aspx\"); in Global.aspx.cs

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

Rou开发者_如何学运维teTable.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?.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消