关于应用程序状态的问题

发布于 2024-08-18 13:47:43 字数 177 浏览 3 评论 0原文

我有一个关于 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听,心雨的声音 2024-08-25 13:47:43

了解什么可能导致 Web 应用程序中的应用程序重新启动非常重要。如果我们不停止这个应用程序重新启动过程,它可能会导致很大的问题,因为所有用户都将开始失去他们的会话。
以下是在 Asp.Net 2.0 中重新启动 Asp.net 应用程序时发生的事件列表

  1. 从应用程序的 Bin 文件夹添加、修改或删除程序集
  2. 从 App_GlobalResources 或 App_LocalResources 文件夹
  3. 添加、修改或删除本地化资源 添加、修改或删除应用程序的 Global.asax 文件。
  4. 添加、修改或删除App_Code目录中的源代码文件。
  5. 添加、修改或删除配置文件配置。
  6. 添加、修改或删除 App_WebReferences 目录中的 Web 服务引用。
  7. 添加、修改或删除应用程序的 Web.config 文件。

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.
孤独陪着我 2024-08-25 13:47:43

例如,您停止/重新启动整个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文