I am trying to access the state of an application from a utility class in a web application, but I'm not sure if this is the best way to do this. I was looking for a static member, but there is no use (I was thinking somewhere along the lines of HttpContext.Current).
The best solution that I have found so far is to have a member in the utility class that will be initialized in the Application_Start event for Global.asax.cs (I can get it from this.Application there), but will there be any or is the risk of "something" happening with this link (I don’t care about restarting the application, because I am only looking for a cache function)?
source
share