Access HttpContext.Current from different threads

前端 未结 5 2074
轻奢々
轻奢々 2020-11-27 02:23

I have a C# ASP.NET application which starts about 25 different threads running some methods in a class called SiteCrawler.cs.

In HttpContext.Current.Session<

5条回答
  •  没有蜡笔的小新
    2020-11-27 03:21

    Have a look at this article by Fritz Onion: Use Threads and Build Asynchronous Handlers in Your Server-Side Web Code. It's quite long, but your requirement is not too trivial.

    Also K. Scott Allen posted a somewhat shorter article about this very issue: Working With HttpContext.Current

提交回复
热议问题