加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

application_start意外触发了asp.net

发布时间:2020-12-16 03:44:15 所属栏目:asp.Net 来源:网络整理
导读:我正在查看一个asp.net应用程序,该应用程序调用应用程序中的数据库在global.asax中启动.这些调用大约需要3秒钟(取决于SQL缓存计划)才能运行.我注意到第一次重新部署时应用程序运行缓慢.我把它放在应用程序启动时对数据库的调用.但是几分钟后,应用程序再次需
我正在查看一个asp.net应用程序,该应用程序调用应用程序中的数据库在global.asax中启动.这些调用大约需要3秒钟(取决于SQL缓存计划)才能运行.我注意到第一次重新部署时应用程序运行缓慢.我把它放在应用程序启动时对数据库的调用.但是几分钟后,应用程序再次需要时间来加载.

为了弄清楚发生了什么,我写了一个日志文件(见下文).从这个文件中你可以看到,当多个请求第一次到达应用程序时,应用程序启动多次.然后看起来application_start以随机方式触发(任何时间为2-10分钟).

根据我对application_starts如何工作的理解,它应该只在应用程序FIRST启动时被触发,但它似乎是从多个客户端随机触发的!根据MSDN“应用程序启动时第一次触发Application_Start事件.”

任何人都可以帮我解决发生的事情吗?我正在使用IIS6和.net 2.0.它是我缺少的应用程序池设置.

非常感谢
Rippo

[12/02/2009 16:16:58] 91.84.25.241 - Application started,Sub MyRules started
[12/02/2009 16:17:06] 65.55.51.34 - Application started,Sub MyRules started
[12/02/2009 16:17:07] 91.84.25.241 - Application started,Sub MyRules completed
[12/02/2009 16:17:10] 65.55.51.34 - Application started,Sub MyRules completed
[12/02/2009 16:17:26] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:30] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:17:30] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:33] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:17:33] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:36] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:17:36] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:39] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:17:42] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:48] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:17:48] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:52] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:17:52] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:17:54] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:18:27] 91.84.25.241 - Application started,Sub MyRules started
[12/02/2009 16:18:31] 91.84.25.241 - Application started,Sub MyRules completed
[12/02/2009 16:18:31] 212.115.51.229 - Application started,Sub MyRules started
[12/02/2009 16:18:33] 212.115.51.229 - Application started,Sub MyRules completed
[12/02/2009 16:29:26] 167.230.38.115 - Application started,Sub MyRules started
[12/02/2009 16:29:28] 167.230.38.115 - Application started,Sub MyRules completed
[12/02/2009 16:29:34] 82.110.42.84 - Application started,Sub MyRules started
[12/02/2009 16:29:37] 82.110.42.84 - Application started,Sub MyRules completed
[12/02/2009 16:29:38] 82.110.42.84 - Application started,Sub MyRules started
[12/02/2009 16:29:41] 82.110.42.84 - Application started,Sub MyRules completed
[12/02/2009 16:32:53] 99.142.1.97 - Application started,Sub MyRules started
[12/02/2009 16:32:57] 99.142.1.97 - Application started,Sub MyRules completed
[12/02/2009 16:32:57] 99.142.1.97 - Application started,Sub MyRules started
[12/02/2009 16:33:01] 99.142.1.97 - Application started,Sub MyRules completed
[12/02/2009 16:33:01] 99.142.1.97 - Application started,Sub MyRules started
[12/02/2009 16:33:06] 99.142.1.97 - Application started,Sub MyRules completed
[12/02/2009 16:33:06] 99.142.1.97 - Application started,Sub MyRules started
[12/02/2009 16:33:10] 99.142.1.97 - Application started,Sub MyRules completed
[12/02/2009 16:33:11] 99.142.1.97 - Application started,Sub MyRules started
[12/02/2009 16:33:16] 99.142.1.97 - Application started,Sub MyRules completed
[12/02/2009 16:36:15] 65.55.51.34 - Application started,Sub MyRules started
[12/02/2009 16:36:17] 65.55.51.34 - Application started,Sub MyRules completed
[12/02/2009 16:41:37] 119.123.226.156 - Application started,Sub MyRules started
[12/02/2009 16:41:37] 62.49.121.122 - Application started,Sub MyRules started
[12/02/2009 16:41:40] 62.49.121.122 - Application started,Sub MyRules completed
[12/02/2009 16:41:40] 119.123.226.156 - Application started,Sub MyRules completed
[12/02/2009 16:41:41] 62.49.121.122 - Application started,Sub MyRules started
[12/02/2009 16:41:44] 62.49.121.122 - Application started,Sub MyRules completed
[12/02/2009 16:45:17] 84.70.249.242 - Application started,Sub MyRules started
[12/02/2009 16:45:19] 84.70.249.242 - Application started,Sub MyRules completed
[12/02/2009 16:47:03] 80.41.121.68 - Application started,Sub MyRules started
[12/02/2009 16:47:05] 80.41.121.68 - Application started,Sub MyRules completed
[12/02/2009 16:47:29] 81.179.26.249 - Application started,Sub MyRules started
[12/02/2009 16:47:31] 81.179.26.249 - Application started,Sub MyRules completed
[12/02/2009 16:47:59] 81.136.179.170 - Application started,Sub MyRules started
[12/02/2009 16:47:59] 81.136.179.170 - Application started,Sub MyRules started
[12/02/2009 16:48:02] 81.136.179.170 - Application started,Sub MyRules completed
[12/02/2009 16:48:02] 81.136.179.170 - Application started,Sub MyRules started
[12/02/2009 16:48:04] 81.136.179.170 - Application started,Sub MyRules completed
[12/02/2009 16:48:04] 81.136.179.170 - Application started,Sub MyRules completed
[12/02/2009 16:52:35] 69.34.161.80 - Application started,Sub MyRules started
[12/02/2009 16:52:35] 69.34.161.80 - Application started,Sub MyRules started
[12/02/2009 16:52:38] 69.34.161.80 - Application started,Sub MyRules completed
[12/02/2009 16:52:38] 69.34.161.80 - Application started,Sub MyRules started
[12/02/2009 16:52:39] 69.34.161.80 - Application started,Sub MyRules completed
[12/02/2009 16:52:39] 69.34.161.80 - Application started,Sub MyRules completed
[12/02/2009 16:52:40] 69.34.161.80 - Application started,Sub MyRules completed

解决方法

检查应用程序重新启动的情况. 最近我们写了一些日志条目到bin文件夹,发生了完全相同的事情,我们不明白原因.然后终于意识到对bin文件夹进行任何修改都会导致应用程序重启.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读