1

I am using a threading architecture in my ASP.NET web application. In this application, I have maintained a global application variable that i want to access in a Thread.

How can i get Application state in a Thread?

RAKESH HOLKAR
  • 2,127
  • 5
  • 24
  • 42
Jitender Mahlawat
  • 2,964
  • 3
  • 16
  • 12

1 Answers1

2

HttpContext.Current will be null in subsequent threads. See this question for details: The cross-thread usage of "HttpContext.Current" property and related things

However, you could just pass System.Web.HttpContext to the threads and access Current from each thread.

Community
  • 1
  • 1
Tudor
  • 61,523
  • 12
  • 102
  • 142