Simon Fell > Its just code > Context.RewritePath

Monday, August 4, 2003

I've been working on an ASP.NET app that uses Context.RewritePath to give friendly style URLs (ala mod_rewrite), everything was working great, but have run into a problem where it doesn't play well with smartNav and redirects. Seems smartNav (which I'm slowing growing to hate its implementation (but not the idea), see my earlier problems with large uploads and smartnav) is not handling the redirect request. The chain of events is
  1. user surfs to 1.aspx
  2. a http module (or global.asax) calls Context.RewritePath("one.aspx") during the BeginRequest event
  3. one.aspx displays a web form to the user
  4. user clicks on the webform, it does a postback, one.aspx handles the postback event and redirects to two.aspx
  5. IE shows a blank page, with one.aspx in the address bar, it appears to just eat the redirect request
This is on ASP.NET 1.1 with IIS 5.0. There's a simple repro case here. Google didn't turn up anything, suggestions welcome, but don't suggest turning off smartNav, I need it.