如果超時,是否有創建新會話的方法?在移動應用程序開發使用asp.net?如果頁面超時,我們如何在頁面上創建新會話
收到此錯誤:
the page requires session state that is no longer available. either the session has expired, the client did not send a valid session cookie, or the session state history size is too small. try increasing the history size or session expiry limit
這是我在我的web.config:
<sessionState cookieless="UseCookies" cookieName="Mobile_Session" regenerateExpiredSessionId="true">
</sessionState>
從技術上講,一旦達到超時,服務器將自動爲同一用戶生成一個新的會話,因爲它將用戶視爲新的訪問者。您可以通過將會話選項設置爲使用「無Cookie會話」並查看URL如何隨着時間的推移而進行測試。我猜你正在研究保存會話還是恢復會話,下面有一些很好的答案。 – 2011-03-15 17:41:07
我清理了一下我的答案。如果您仍然遇到麻煩,可能需要一些環境。希望能幫助到你! – agradl 2011-03-15 18:00:13