IIS Loading Rewritten URLs Twice
August 30, 2006 10:48 AM   Subscribe

I have a C#/.NET Application on IIS. I am rewriting the URLs via ISAPI Rewrite. The rewritten URLs are all loading twice. ISAPI Rewrite's creators insist it isn't them, but visiting the non-rewritten URL, the page only loads once. What could be causing this?

The HttpModule contains a PreRequestHandlerExecute event that should be happening (AFAIK) after the ISAPI filter gets hit, but attaching to the event in the debugger shows two requests for rewritten urls, one for non-rewritten urls. I've never had this problem before, but then I've never (consider this a red flag, I suppose) written an HttpModule before or been as concerned with performance in an app*. In rough numbers, it looks like solving this problem would give me a 50% performance increase.

Obviously I've been concerned with app performance before, but this is the largest app by far.
posted by yerfatma to Computers & Internet (1 answer total)
 
Don't know what your problem is, but if you want to try an alternative, you can also handle the rewrite for your .aspx pages in Global.asax.cs by tweaking the path in the Application_BeginRequest() method. More here.
posted by Good Brain at 11:19 AM on August 30, 2006


« Older How do you mount unmounted art?   |   Love triangle involving your best friend Newer »
This thread is closed to new comments.