FormsAuthenticationConfiguration.Cookieless 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定值,指出表單架構驗證是否該使用 Cookie 。
public:
property System::Web::HttpCookieMode Cookieless { System::Web::HttpCookieMode get(); void set(System::Web::HttpCookieMode value); };
[System.Configuration.ConfigurationProperty("cookieless", DefaultValue=System.Web.HttpCookieMode.UseDeviceProfile)]
public System.Web.HttpCookieMode Cookieless { get; set; }
[<System.Configuration.ConfigurationProperty("cookieless", DefaultValue=System.Web.HttpCookieMode.UseDeviceProfile)>]
member this.Cookieless : System.Web.HttpCookieMode with get, set
Public Property Cookieless As HttpCookieMode
屬性值
其中一個 HttpCookieMode 值。 預設值是 UseDeviceProfile。
- 屬性
範例
下列程式代碼範例示範如何存取 Cookieless 屬性。 請參閱類別主題中的 FormsAuthenticationConfiguration 程式碼範例,以瞭解如何取得區段。
// Get current Cookieless.
System.Web.HttpCookieMode currentCookieless =
formsAuthentication.Cookieless;
// Set current Cookieless.
formsAuthentication.Cookieless =
HttpCookieMode.AutoDetect;
' Get current Cookieless.
Dim currentCookieless _
As System.Web.HttpCookieMode = _
formsAuthentication.Cookieless
' Set current Cookieless.
formsAuthentication.Cookieless = HttpCookieMode.AutoDetect
備註
屬性 Cookieless 會定義表單型驗證是否應該使用 Cookie 來交換使用者資訊。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應