关于应用程序状态的问题
我有一个关于 ASP.NET 中的应用程序状态的问题。据我所知,存储在应用程序状态中的数据不是永久的,当应用程序重新启动/停止时数据会丢失。那么,“应用程序重新启动/停止”是什么意思?
第二个问题: 如果应用程序状态存储的数据很少,比如说3-4个数据,如果我继续每1秒读取一次应用程序状态的数据,会影响页面/服务器的性能吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
了解什么可能导致 Web 应用程序中的应用程序重新启动非常重要。如果我们不停止这个应用程序重新启动过程,它可能会导致很大的问题,因为所有用户都将开始失去他们的会话。
以下是在 Asp.Net 2.0 中重新启动 Asp.net 应用程序时发生的事件列表
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
例如,您停止/重新启动整个 IIS 服务或特定网站。
或者该 Web 应用程序的工作进程或应用程序池被停止/重新启动/回收。
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.