Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to have a global singleton for the entire asp.net web application for high create cost objects or those with bound resources (i.e. an embedded database).

I have tried adding a singleton but it seems to be recreated if the requests stop for a period of time (a couple of seconds).
Posted
Comments
ZurdoDev 17-Sep-13 14:10pm    
What?

1 solution

Basically Singleton pattern is not preference for Web Application.

Application state is a kind of Singleton in the sense it's one object for every user and whole application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900