当 IIS 6.0 上的 ASP.NET Web 应用程序 (asmx ws) 闲置数小时左右时,会发生什么情况?

发布于 2024-08-17 17:45:59 字数 259 浏览 3 评论 0原文

我有一个 asmx Web 服务,并将一堆系统数据加载到内部数据结构中。该系统数据用于检查请求的有效性。但是,当 3 小时(可能更短)内没有请求时,将再次进行初始化。为请求提供服务的对象具有

私有静态 bool _initOk

控制初始化的 变量。当应用程序空闲时,该变量设置为 false。是因为IIS停止执行并且包含代码的dll被卸载还是其他什么原因?如果请求按稳定间隔到达,则不会再次进行初始化。我能做些什么吗?

谢谢!

br:马蒂

I have an asmx web service and I load bunch of system data to internal data structures. This system data is used to check the validity of requests. However when there is no requests for say 3 hours (maybe less) the initializations are done again. The object that serves the requests has

private static bool _initOk

variable that controls the initialzation. When application is idle the variable is set to false. Is it because IIS stops the execution and dll containing the code is unloaded or something? If requests arrive on steady interval the initializations are not done again. Is there anything I can do about it?

Thanks!

br: Matti

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

初见 2024-08-24 17:45:59

它是应用程序池(在IIS管理器下找到)的设置,当进程闲置一段时间时是否停止该进程,或者在满足某些条件时是否重新启动(回收)它。

每次重新启动该进程时,都会再次完成初始化。

It is a setting of the application pool (found under IIS Manager), whether to stop the process, when it is iddle for a period of time, or wether to restart (recycle) it when certain conditions are met.

On each restart of the process, your initialization will be done again.

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