A question regarding application state
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
- Adding, modifying, or deleting assemblies from the application's Bin folder
- Adding, modifying, or deleting localization resources from the App_GlobalResources or App_LocalResources folders
- Adding, modifying, or deleting the application's Global.asax file.
- Adding, modifying, or deleting source code files in the App_Code directory.
- Adding, modifying, or deleting Profile configuration.
- Adding, modifying, or deleting Web service references in the App_WebReferences directory.
- 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.
精彩评论