HTTPModule BeginRequest should us Response.Redirect or Server.Transfer

前端 未结 1 788
旧巷少年郎
旧巷少年郎 2020-12-21 11:27

We have a URLRewriting module that is using a Response.Redirect in the BeginRequest event method to change the destination page.

  • Would it be better to use Ser
相关标签:
1条回答
  • 2020-12-21 11:54

    Here's the best explanation of Redirect vs Transfer vs RewritePath; http://www.developerfusion.com/article/4643/implementing-http-handlers-in-aspnet/4/

    To summarise; Redirect requires roundtrip to browser, Transfer ensures the original Request object remains not the new request but has problems with Post-backs, Rewrite loses the orginal Request object but is the best for performance.

    0 讨论(0)
提交回复
热议问题