Using an HTTPContext across threads

后端 未结 4 1454
长发绾君心
长发绾君心 2020-12-11 01:42

User hits page spawn.aspx which then spawns a half-dozen threads, rendering pages all using

 ((System.Web.IHttpHandler)instance).ProcessRequest(reference to         


        
4条回答
  •  春和景丽
    2020-12-11 02:24

    I would ensure that any time you access the HttpContext.Current.Items collection, that you use a Monitor lock (C#)/SyncLock(VB) block on the HttpContext.Current.Items.SyncRoot object to wrap your calls.

提交回复
热议问题