>You have to be careful if you rely upon a shared variable within asp.net
as the web server can still choose to load a new app domain if that is
easier for processing threads. It can also remove one to free memory if
it hasn't been used in a while.
Thanks for the reply!
I want to share one instance of an object across an app domain (in an
ASP dot net application), and I'm trying to weigh the pros and cons of
the following two approaches:
a) Storing the object in ApplicationState
b) Storing the object in a static member variable (utilizing a
singleton design pattern)
Any recommendations on which method would be more suitable?
Are there any other approaches that might be better?
The object in question is a dot net class wrapping a COM component.
The class creates an SSL session to a proprietary device that manages
encryption and decryption.
Thanks,
Jonathan