I am trying to have a variable that is an object exist once on the server for an ASP.Net Application. I want to fire it up and then allow every user of the application to have it.
My understanding is that the Global.asax
file contains a method called Application_Start
that starts up every time a user calls for the first time. And it has a method Application_BeginRequest
for each request.
The method Application_Start
does not suit my needs as it is once per user.
Is it possible to somehow have an object for all users?
Storing a global variable in a static class will not work either as it once instance per user of the application.
The reason for the need is we are trying to use a new product and improve performance(speed) and the declaration and initialization of this object is a performance cost we are trying to circumvent.
Stackoverflow-Global.asax does not really help me and
Stackoverflow-SessionVariables does not solve my need
Is there a way of storing an object variable in a file available for the whole pool of users? I am at a a loss as tho the solution?