State and Web Gardens RRS feed

  • Question

  • User1509363267 posted
    I am building a component which utilizes some memory, therefore I would like to create it under a Singleton design pattern and store a reference to it in the Application objecy property bag. My question is what effect will configuring ASP.NET to use out-of-process session management, same server, to support application pooling i.e. Web Gardens. Multiple users using this same object is fine, I realize that the object will have to be thread safe but it doesn't really make sense to have a seperate object per user session and hence the object is not serializeable
    Wednesday, March 3, 2004 9:34 AM

All replies

  • User209782248 posted
    Application state is per appdomain and so is your singleton, so each application instance in your web garden will have a separate instance of your object. If you need to share the state of this object, you'll need to store it out of process somewhere. To learn more about using OOP session state and limitations (which shouldnt affect your component), see this faq: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504 Thanks,
    Friday, March 5, 2004 1:53 AM
  • User1509363267 posted
    Thanks for the reply. I think I understand the Garden concept better now. If I want a singleton across all Web Garden apps it will have to done out of process. Now to look over remoting. Regards
    Friday, March 5, 2004 2:09 PM