Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: .NET HttpModule and ISAPI Rewrite (Topic Closed Topic Closed) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ChesterAArthur
Newbie
Newbie


Joined: 29 November 2005
Location: United States
Online Status: Offline
Posts: 5
Posted: 25 July 2006 at 1:09pm | IP Logged  

I've created an HttpModule in my new C# application. I have an event handler tied to application_PreRequestHandlerExecute. This event is firing twice on every page load: once for the initial request and once for the rewritten url request. The rules in question just have [L,I] on them. Is there something else I could do to avoid the duplication or do I need to attach to an event further along in the request?

Thanks.
Back to Top View ChesterAArthur's Profile Search for other posts by ChesterAArthur
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 8080
Posted: 27 July 2006 at 6:46pm | IP Logged  

That is impossible unless you have a redirect somewhere that forces second request to a web server. ASP.NET handlers work after ISAPI_Rewrie processing. So, there is no way for HTTPHandler to see original URI.
Back to Top View Lexey's Profile Search for other posts by Lexey
 
ChesterAArthur
Newbie
Newbie


Joined: 29 November 2005
Location: United States
Online Status: Offline
Posts: 5
Posted: 27 July 2006 at 7:55pm | IP Logged  

That's fine, I don't need to see the original URI. I just don't want my event to fire on both requests as it's doubling the amount of effort on the box. Is there anyway to do that?
Back to Top View ChesterAArthur's Profile Search for other posts by ChesterAArthur
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 8080
Posted: 29 July 2006 at 4:18pm | IP Logged  

You will need to find out what is leading to a second request to a server.
Back to Top View Lexey's Profile Search for other posts by Lexey
 

Sorry, you can NOT post a reply.
This topic is closed.

  Post ReplyPost New Topic
Printable version Printable version

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