共用方式為


AuthenticationSection.Mode 屬性

定義

取得或設定驗證強制回應性。

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

其中一個 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

適用於

另請參閱