开发者

Server.TransferRequest is not preserving HttpContext.Items

开发者 https://www.devze.com 2023-01-16 10:34 出处:网络
I\'ve just updated my ASP.Net code from HttpContext.RewritePath(targetPath) to use the .Net 3.5 function: HttpContext.Server.TransferRe开发者_运维技巧quest(targetPath,true)

I've just updated my ASP.Net code from HttpContext.RewritePath(targetPath) to use the .Net 3.5 function: HttpContext.Server.TransferRe开发者_运维技巧quest(targetPath,true)

However, I now no longer have any of the custom HttpContext.Items that I added, before the transfer.

Anyone have any ideas as to how I overcome this?


According the documentation, it preserves the querystring and Form collection, but it says nothing about context items. I'd say that you'll have to send them in other way: querystring or session.

0

精彩评论

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