Welcome Guest Search | Active Topics | Members | Log In | Register

URLRewrite Options · View
Nathan
Posted: Thursday, February 11, 2010 2:49:22 PM

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.
asiemer
Posted: Wednesday, February 17, 2010 7:37:01 AM

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.com
blog.andrewsiemer.com
forum.socialnetworkingin.net
blog.socialnetworkingin.net
www.pictfresh.com
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.028 seconds.