SU
M
T
W
TH
F
S


JAN FEB MAR APR


MAY JUN JUL AUG


SEP OCT NOV DEC
2018
17
  Home :: Blog :: URL Rewriter Blocking Response.Redirect Skip Navigation Links
URL Rewriter Blocking Response.Redirect      
  1/5/2008 11:54:45 PM

A while back, I implemented the URLRewriter mentioned on Scott Gu's Blog.  This gave me the ability to create search engine friendly URLs for all my pages and dynamic content.  All was well until I started to get a bit fancy.

My first attempt was to have URLs that can directly access specific albums from one album page, passing a HTTP parameter.  That took almost no time to do.  The result was www.boogieland.org/album/album24.aspx.  That was cool.  It was searchable.  When it came time to do add this function to the blogs, somehow blog12 just doesn't quite have the ring to it.  Afterall, who would ever read a blog that has the URL of blog12?  I started to look around, and decided the title-with-dash-in-place-of-spaces look was cool.  As a result, blog12 became www.boogieland.org/ReadBlog/Software-and-Medicine.aspx.  Having done this, I decided to give the albums a face-lift.  However, I didn't want to eliminate the previous efforts in case anyone had either bookmarked previous URLs or were revisiting from emails I had sent out.  Instead, I rewrote the album page to accept both title-with-dash and the legacy number system, creating www.boogieland.org/ViewAlbum/Flight-To-UK.aspx.  This is when things got interesting...

What I didn't mention was like most photo gallery sites, I had written permissions into my album.  When linked to a protected album, the page will be redirected to the login page requesting the visitor to login.  Somehow, with the two URLrewriting going on, my Response.Redirect stopped working.  At first I didn't realize this.  Within VS2005.net, everything worked just fine.  When I deployed the site, and sent out almost 20 notices of new pictures, emails came back saying that no one was able to see the page.  After chasing several rabbits, I realized that the problem was Response.Redirect was not working.  In fact, I can have Respose.Redirect as the first command in the OnLoad method, and it just hangs.

I did some searching around and found an article describing the differences between Response.Redirect and Server.Transfer.  In short, things work now.  While I was chasing the rabbits, I was convinced the problem was my logic.  It turns out there was nothing wrong with my logic.  The only difference in behavior, as listed in article, is the URL in the browser does not change, as it goes to the Login page.  That's just fine for me as most visitors don't notice that.  All they see is that they are in a Login page.  In fact, I kinda like that.  It hides the HTTP parameter passed for the ReturnUrl.  I am a happy camper again!

0 comment is found.
  

Add A Comment
Name: 
Website:   (Include http://)
Comment:

 
 
Blogs
General
#DailyThanks
Some Things Were Never Me...
The Vegas Sandwich
Thankful Perspective
Chick-Fil-A and Swimming
Rude People Are Not Born ...
Time for Some Calcium
Cat Lovers Beware! The Re...
An Eventful Day
Making Iced Coffee
Brakes are underrated
Perpetual Victim
Cellphones and The Cancer...
Smoke and Mirrors
How to put a gash on the ...
How does one spot the ice...
Saddest Day At The Happie...
Awesome Grape Candy From ...
Recommended Vendor for Ca...
Trying To Figure Out If A...
Last Showing of Disneylan...
Free HotSpot Wifi Interne...
Bribing The Mexican Polic...
Vacation? Go fly a kite
Common Courtesy
Facebook Site with Google...
Water Damage Phase 5 - Fu...
Water Damage Phase 4-Furn...
Water Damage Phase 3
Water Damage Phase 2
Water Damage Phase 1
Home Sweet Home... Buyer...
Where Is America Going?
Taiwan, One Of The Jewels...
What's With These "Social...
Why Am I Still Up At This...
The Reason For The Season
Generation Of Mediocrity
One of the Strongest Typh...
Pouring Buckets
Familiar Sticky Feeling
Whatever Happened To Cust...
Software and Medicine
Lifetime Student...
All is well
Father's Love
Old Friends
Ant Problems (Round 3)...
Getting old...
Ant Problems (Round 2)...
Ant Problems...
Technology
Da Vinci 1.0 Stepper Moto...
The Infinite Wisdom of We...
Android 4.2 Battery Drain
VPN Using Cisco SOHO Rout...
Chinese IME for Android
Two Excel Documents Side-...
ASP.net Calling passing p...
Facebook "Like" Button
VS 2008 TFS TF30177 Error
Microsoft Updates Killed ...
Host Department No More!
Microsoft Updates Killed ...
I Am LinkedIN
Traditional Chinese Suppo...
BlackBerry Enterprise Ser...
VMWare Virtual Machine Im...
Missing XP Desktop Taskba...
Obout HTML Editor
Google Web Accelerator?
Working with Classes...
Slow Service... No More!
Slow Service...
Slow Service...