in the Global.asax file, I manage some threads, and - from the Controller - I need to invoke an event of the one's thread. Is it possible to have access to that thread ?
You could use the application state to store some object that will be shared among all users of the application:
protected void Application_Start()
{
Application["foo"] = "bar";
...
}
and inside your controller you can access this property:
public ActionResult Index()
{
var foo = HttpContext.Application["foo"] as string;
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With