我主要針對桌面開發,所以我傾向於認爲WebForms等同於WinForms的Web。不幸的是,這不是事實。查看狀態超時錯誤
最近我發現Viewstate有某種超時。
我的問題是類似的,因爲我已經閱讀了大多數問題,尤其是here(在我的情況下只有5到10分鐘左右)。
Here微軟表示,這個問題的一個解決方案是:
<asp:Page EnableViewStateMac="False" />
但是我們可以進一步閱讀,他們說:
Security Note:
This attribute should never be set to false in a production Web site,
even if the application or page does not use view state.
The view state MAC helps ensure the security of other ASP.NET functions
in addition to view state.
爲此,我不想EnableViewStateMac設爲假,我沒有訪問我的服務器(共享主機)。
我的問題是:即使我們的頁面長時間閒置,我們是否可以在回傳之間存儲Viewstate?如果是,如何?
謝謝
你可以告訴你在ViewState用來存儲對象的代碼? – rene
@rene:我不存儲ViewState。我甚至不知道這是否可能。所以,我的問題的原因。 – user3174393
@ user3174393您可以添加有關您遇到的實際錯誤的詳細信息嗎? – geedubb