开发者

A question regarding application state

开发者 https://www.devze.com 2022-12-17 00:14 出处:网络
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 \'app

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 t开发者_StackOverflow中文版he 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消