See how to get the benefits of rerouting while alleviating the risks with this in-depth look at URL rewriting in ASP.NET.
MSDN Magazine January 2009
View Complete Post
For example I have a site structure
I want to create a route:
when user types http//mysite.com/UserName
physical path will be http//mysite.com/Members/Default.aspx
when user types http//mysite.com/UserName/Info.aspx
physical path will be http//mysite.com/Members/Info.aspx
when user types http//mysite.com/UserName/About.aspx
physical path will be http//mysite.com/Members/About.aspx
I want to replace "Members" part of the url by any "UserName" that user will type, all other should be the same.
I have ASP.NET 4 Web Forms web application project in which I am attempting WCF REST service routing as follows:
I cannot get the WCF REST service properly routed in a ASP.NET 4 Web Form only web application project.....however if I create a combo ASP.NET 4 MVC2/Web Forms web application project.....the routing always works fine.
I thought the URL routing module no longer needs to be included for ASP.NET 4 projects ?.....regardless of whether it is Web Forms or MVC based ?
I'm trying to upgrade to .NET 4 and MVC 3.
When trying to compile my project, I get the error:
The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
I do have the System.Web.Routing in my references for the project.
BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside! The System.Web.Routing namespace is not in there - the entire thing is empty! Could it that the dll is corrupted? I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!
The dll is coming from here:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll
and the runti