 Rank: Newbie Groups: Member
Joined: 1/21/2010 Posts: 2 Points: 6
|
I am finishing Chapter 4. Did anyone else have a problem with the default document when launching the website? Mine was getting caught up in the URL rewrite.
For example: type http://fisharoo in the URL and get http://fisharoo/PageNotFound.aspx after running all the way through the URLRewrtite logic and hitting redirect to PageNotFound.aspx.
I had to add in the URLRewrite class (before the "if (!File.Exists(application.Request.PhysicalPath))" logic:
if (application.Request.Path.EndsWith("/")) context.Response.Redirect("~/Default.aspx");
But, I wonder if there is a better way to get around this issue?
Any suggestions out there? What I have done works; just looking for a better way.
TIA for any advice.
|
 Rank: Administration Groups: Administration
Joined: 12/8/2008 Posts: 187 Points: 313 Location: California
|
With routing being included in asp.net 4.0 I would suggest ripping out the urlrewrite all together and fashioning some routing rules instead.
Andrew Siemer www.andrewsiemer.comblog.andrewsiemer.comforum.socialnetworkingin.netblog.socialnetworkingin.netwww.pictfresh.com
|