开发者

Where does a HttpContext value get stored

I would like to know, if I store a value using HttpContext.Current.Items.Add, where does it get stored? Is it on the Server, or client side like ViewState?

Will storing value开发者_开发技巧s in HttpContext.Current.Items.Add give problems in a Web farm situation?

Thanks in advance.


It is stored in the thread storage area.

I am not going into much detail for asynchronous processing when thread changes but in a context switch, context gets copied - I believe.


It is stored in the memory of the server and the value is available for the entire lifetime of the request.


I think the HTTPContext is stored on the server it comes from the HTTP request.


HttpContext.Current.Items is basically an IDictionary object (hashtable) whose scope is the life of the request.

See https://web.archive.org/web/20201202215202/https://www.4guysfromrolla.com/articles/060904-1.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜