急问: forms authentication time out 的正常表现是什么
王大大树 2006-06-06 03:45:47 请问如果forms authentication times out后,客户端的正常表现应该是什么?系统是不是会自动把客户重定向到login页面?
我用的是asp.net 1.1, 在web.config中
<authentication mode="Forms">
<forms ame="mywebapp" loginUrl="login.aspx" protection="All" timeout="60"
</authentication>
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="240"
/>
问题有二:
1) 有的时候用户idle 40分钟左右后(session timeout 是12个小时)做一个postback的动作(比如click一个submit button),系统会自动把用户重定向到login页面, 然后就会throw invalid viewstate exception,因为login.aspx不认识别的页面上的viewstate.
2) 我自己做测试的时候,即使idle了2个小时,页面也不会自动更新到login.aspx, 然后我click submit button, 被重定向到login.aspx,但是没有任何exception被扔出。
请问正常情况下,forms authentication time out是不是会自动刷新页面,把用户重定向到login页面?如果不是这样,有没有什么办法实现这种表现?谢谢。