FormsAuthenticationConfiguration.Cookieless 属性

定义

获取或设置一个值,该值指示基于窗体的身份验证是否应使用 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 来交换用户信息。

适用于

另请参阅