【发布时间】:2012-04-12 06:03:55
【问题描述】:
虽然效率很低,但我需要将 ASP.NET 会话保持 10 小时……(600 分钟)
所以我在网络配置中写了...
<authentication mode="Forms">
<forms slidingExpiration="true" loginUrl="algoExpirou.aspx" name="AuthCookieConte" timeout="600" path="/">
</forms>
</authentication>
和 ' 门票...
Dim isPersistent As Boolean = False
Dim ticket As New FormsAuthenticationTicket(1, strNomeDoRespondente, System.DateTime.Now, DateTime.Now.AddMinutes(600), isPersistent, userData, FormsAuthentication.FormsCookiePath)
Dim encodedTicket As String = FormsAuthentication.Encrypt(ticket)
Response.Cookies.Add(New HttpCookie(FormsAuthentication.FormsCookieName, encodedTicket))
会议!!
Session.Timeout = 600
无论如何,大约 25 分钟后,某些东西会从日志中消失:
5:11:25 - 登录
5:35:28 - 超时...
0:24:03 区别
现在我知道发生了什么。该站点的托管是共享的,我想知道超时是否有限制,但是该站点正在测试中,没有人使用它!
感谢您对它的任何想法......问候,RConte
【问题讨论】: