ASP.NET web form Routing issue via UNC Path

Posted by Slash on Stack Overflow See other posts from Stack Overflow or by Slash
Published on 2012-06-27T10:58:46Z Indexed on 2012/06/28 9:16 UTC
Read the original article Hit count: 248

I create a IIS 7.0 website via UNC path to load .aspx to dynamic compile files and runs. however, it's running perfect.

I always use IIS URL Rewrite module 2 to rewrite my site URL n' its perfect, too.

Today, I wanna use System.Web.Routing to implement url rewrite but I encountered difficulties...

When I wrote code in Global.asax: System.Web.Routing.RouteTable.Routes.MapPageRoute("TEST", "AAA/{prop}", "~/BBB/CCC.aspx");

And it just CANNOT reDirect to /BBB/CCC.aspx

When I type the URL(like: xx.xx.xx.xx/BBB/CCC.aspx) in browser directly, it runs normally that I want. (so it proof CCC.aspx is in right path.)


thus, I copy all of the code and open VS2010 running with IIS 7.5 Express locally, it works perfect!

e.g: in browser URL I type xx.xx.xx.xx/AAA/1234, it will turn to page xx.xx.xx.xx/BBB/CCC.aspx (Works perfect!)

Why??? help me plz. thanks.


Update:

I think I should consider not UNC path to make it error!

when I move all code to physical disk and setup IIS 7.0 to monitor this Folder, it still not works! But the same code run in VS2010 + IIS 7.5 Express it works!? so strange!

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET