我有一个网站托管在活动服务器上,我的会话不断丢失。什么会导致Application_Start导致会话丢失?
我已经添加了一些日志记录到我的global.asax来检查应用程序何时开始和结束以及会话开始和结束的位置以及是否存在应用程序错误。
当我导航到我的网站时,应用程序在我登录会话开始并存储我的电子邮件和用户标识后启动。之后,我只是在我的网站周围浏览了一分钟左右,然后我自动注销了。自动注销是会话为空的结果,然后我放弃它。
以下是我上面的测试日志。
[11:4:57:802] Application has started
[11:4:58:872] Session has started
[11:4:58:890] Set Email Sessions
[11:4:59:61] Set PracticeId and PractitionerId Sessions
[11:6:49:838] Application has started
[11:6:5:391] Session has ended
[11:6:5:445] Application has ended
[11:6:8:208] Session has started
[11:6:8:338] Abandon Session
[11:6:8:343] Session has ended
我已经测试过,这是不特定链接的问题和运行的本地主机上的网站时,这不会发生。我失去了我的会话,因为应用程序启动被我开除,然后将会话设置为空。
什么可能导致application_start被随机触发?