Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi Every one
I am having a bit confusion regarding the Application object.
Is application object is created for every user or it is created only once when the website runs and all other upcoming users are simply attached to the application object.
Is Application object ends when there are no user to access the website?
Please guide
Regard
TanzeelurRehman
Posted
Comments
Wild-Programmer 1-Apr-11 3:50am    
It is created only once and gets destroyed when the IIS is reset.
TanzeelurRehman 1-Apr-11 3:55am    
is this right that all application level setting and configuration resides with in this object.

Albin Abel 1-Apr-11 3:52am    
If you look at the global.asax file, you may be find the answer by yourself
TanzeelurRehman 1-Apr-11 3:55am    
Thanks for your response,
avigodse 1-Apr-11 9:42am    
I agree to my all answer posted friends, and i'll like add some in that is, those should be not created for each user, improper use of application variables can lead to excess memory usage and even attract many data security issues.
These application variables has to be destroyed manually during runtime, or it will wait untill application is stopped by IIS server.

The Application object is created by the first user, and destroyed when the last user session ends. It is thus quite dangerous to keep information in...

As usual, MSDN[^] can tell you more.
 
Share this answer
 
Comments
Albin Abel 1-Apr-11 3:56am    
It is thus quite dangerous to keep information in...Good point. My 5
 
Share this answer
 
Comments
TanzeelurRehman 1-Apr-11 3:53am    
Thank you for your response, I found it very informative

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