开发者

Application Lifecycle Event Not Fired when Server.Transfer

I have a custom rewrite module and when specific query string parameters are passed i need to be able to call a server.transfer and not a response.redirect due to adserve software and tracking

in the Init Event of the RewriteModule i register the events:

BeginRequest PreRequestHandlerExecute ReleaseRequestState

when a Response.Redirect is called the ReleaseRequestState event is actually called and the rewrite module is complete and the new control URL's are set

when a Server.Transfer is called then the ReleaseRequestState event is not called and the friendly URL's are not set

i think i understand the different between a Response.Redirect and Server.Transfer but i cannot work out why the event is actually not called - is the Session.End or Session.Abandon event being called and this the event is never fired? or is something completely different happening he开发者_如何学编程re

thanks

paul


I'm guessing it's the subtle differences between the two.

Response.Redirect does a client-side redirect -- meaning the client browser is sent a message telling it to request a different URL and therefore giving you a new request.

Server.Transfer doesn't create a new request (http://msdn.microsoft.com/en-us/library/y4k58xk7.aspx). It just stops working on the current page and begins work on another page -- no new request.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜