Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

什麼是檢視狀態?

檢視狀態是在 ASP.NET 應用程式中的 WebForms (.aspx) 頁面之間來回的資訊。__VIEWSTATE 欄位的 HTML 標記可能如下所示:

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="..."/>
可能會儲存於 __VIEWSTATE 欄位的項目的其中一例為 Button 控制項的文字。如果使用者按一下按鈕,Button_Click 事件處理常式將可以從檢視狀態欄位擷取 Button 控制項的文字。請參閱 Microsoft Developer Network (MSDN) 網站上的 ASP.NET 檢視狀態概觀 主題以取得詳細的 ASP.NET 檢視狀態概觀。

由於 __VIEWSTATE 欄位包含可在回傳時重新建構頁面的重要資訊,請確認攻擊者無法竄改此欄位。如果攻擊者送出惡意 __VIEWSTATE 承載,攻擊者可能會誘騙應用程式執行在其他狀況下無法執行的動作。

如果要防止此竄改攻擊,訊息驗證碼 (MAC) 會保護 __VIEWSTATE 欄位。ASP.NET 會驗證回傳發生時,與 __VIEWSTATE 承載一併送出的 MAC。Web.config 檔案中的應用程式

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×