Hello!
I want to use "Server.Transfer(Request.FilePath)" or "Response.Redirect(Request.FilePath)" to force the server to another roundtrip.
But now I use user-friendly URLs (a method in Global.asax).
void RegisterRoutes(System.Web.Routing.RouteCollection routes)
{
routes.Clear();
// 4ahwii/m_haftung.aspx
routes.MapPageRoute("/4ahwii/haftungsausschluss", "4ahwii/haftungsausschluss", "~/4ahwii/m_haftung.aspx");
routes.MapPageRoute("/4ahwii/haftung", "4ahwii/haftung", "~/4ahwii/m_haftung.aspx");
// 4ahwii/m_impressum.aspx
routes.MapPageRoute("/4ahwii/impressum", "4ahwii/impressum", "~/4ahwii/m_impressum.aspx");
}
I changed all route names to the virtual path because the method "GetRouteUrl(..., ...);" always throwed the exception "Couldn't find "/4ahwii/impressum" in [...]".
But now I always get an unhandled exception - ?
Server.Transfer(GetRouteUrl( ...
Go to the complete details ...