AuthenticationSection.Mode 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置身份验证模式。
public:
property System::Web::Configuration::AuthenticationMode Mode { System::Web::Configuration::AuthenticationMode get(); void set(System::Web::Configuration::AuthenticationMode value); };
[System.Configuration.ConfigurationProperty("mode", DefaultValue=System.Web.Configuration.AuthenticationMode.Windows)]
public System.Web.Configuration.AuthenticationMode Mode { get; set; }
[<System.Configuration.ConfigurationProperty("mode", DefaultValue=System.Web.Configuration.AuthenticationMode.Windows)>]
member this.Mode : System.Web.Configuration.AuthenticationMode with get, set
Public Property Mode As AuthenticationMode
属性值
AuthenticationMode 值之一。
- 属性
示例
下面的代码示例说明如何使用 Mode 属性。
// Get the current Mode property.
AuthenticationMode currentMode =
authenticationSection.Mode;
// Set the Mode property to Windows.
authenticationSection.Mode =
AuthenticationMode.Windows;
' Get the current Mode property.
Dim currentMode As AuthenticationMode = _
authenticationSection.Mode
' Set the Mode property to Windows.
authenticationSection.Mode = _
AuthenticationMode.Windows