I need some help on the following: My class library (dll) uses a variable
declared as public in order to share central information to all classes in
the application (such as connectionstring etc).  This works fine with
WinForm apps using the class library, as one instance of the public
variable exists per appdomain.

I need to use the same class library for an ASP app as well, and this is
where I need some help : How to get the ASP app to instantiate one
instance of my public variable per user session:

I have played around a lot with createing serializable classes and
creating my own appdomains, but my solutions are not very ellegant, adn I
reckon I can surely not be the only guy to have run into this issue.  ? Is
there any way to just "configure" my way out of this? (would be the first
prize), or any other relatively easy way to get around this issue?

Thx

JC Oberholzer

-- Technical info: Each of my class libraries always has a class
clsSystem, with private constructure and a shared function GetInstance
which is used to ensure I have only one onstance of my public variable in
the app

public class clsSystem
..
 Public Shared Function GetInstance () as clsSystem

Reply via email to