views:

53

answers:

2

I have a question regarding the application state in asp.net. As i know, data stored in application state is not permanent, data lost when the application is restarted/stopped. So, what does the 'application is restarted/stopped' mean?

2nd Question: If there are few data store in the application state, let's say 3-4 data, will it affect the performance of the page/server if i keep reading the data in application state every 1 second?

+1  A: 

E.g. You stop/restart the entire IIS service or for that particular website.

Or the worker process or the application pool for that web application is stopped/restarted/recycled.

o.k.w
+4  A: 

It’s very important to know what can cause an application restart in the web application. If we do not stop this application restart process it can cause great problem, as all the user will start loosing their session in the middle of nothing. Here is a list of events when the Asp.net application restarts in Asp.Net 2.0

  1. Adding, modifying, or deleting assemblies from the application's Bin folder
  2. Adding, modifying, or deleting localization resources from the App_GlobalResources or App_LocalResources folders
  3. Adding, modifying, or deleting the application's Global.asax file.
  4. Adding, modifying, or deleting source code files in the App_Code directory.
  5. Adding, modifying, or deleting Profile configuration.
  6. Adding, modifying, or deleting Web service references in the App_WebReferences directory.
  7. Adding, modifying, or deleting the application's Web.config file.
Muhammad Akhtar
+1 for listing the extensive scenarios
o.k.w