Or in the "Cache" if that singleton can be weakly referenced. The only
difference between Cache and Application objects is that Application ones
are guarenteed to be there whenever you ask and Cached ones, you will need
to verify that they exist before using them.
Just another suggestion.
--
Girish Bharadwaj
http://msmvps.com/gbvb
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ug**************@TK2MSFTNGP10.phx.gbl...
Store it in the Application Context...
Reference it through the application context.
"Sergei Shelukhin" <ra******@home.domonet.ru> wrote in message
news:2t*************@uni-berlin.de... Suppose I want to supply a singleton class object that will sit between
my intranet asp.net app and MS SQL database, doing al the chemistry with
connections etc inside of it.
The problem is that I don't really know how to keep the object
persistent for all the requests nade within the app.
I need the object to live for certain periods of time, and I need it to
be easily accessible from aspx.cs files' code.
I guess I will be creating it in global.asax on application start; where
do I store it then? How do I address it?