VirtualDirectory.LogonMethod Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft die Authentifizierungsmethode ab, die das virtuelle Verzeichnis für den Zugriff auf den konfigurierten physischen Speicherort verwendet, oder legt diese fest.
public:
property Microsoft::Web::Administration::AuthenticationLogonMethod LogonMethod { Microsoft::Web::Administration::AuthenticationLogonMethod get(); void set(Microsoft::Web::Administration::AuthenticationLogonMethod value); };
public Microsoft.Web.Administration.AuthenticationLogonMethod LogonMethod { get; set; }
member this.LogonMethod : Microsoft.Web.Administration.AuthenticationLogonMethod with get, set
Public Property LogonMethod As AuthenticationLogonMethod
Eigenschaftswert
Einer der AuthenticationLogonMethod Werte für das aktuelle virtuelle Verzeichnis. Der Standardwert lautet ClearText.
Beispiele
Im folgenden Beispiel wird veranschaulicht, wie die LogonMethod Eigenschaft eines virtuellen Verzeichnisses festgelegt wird.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;
using Microsoft.Web.Management;
namespace AdministrationSnippets
{
public class AdministrationAuthenticationLogonMethod
{
// Creates a new virtual directory and sets the logon method.
public void SetLogonMethod()
{
ServerManager manager = new ServerManager();
Site defaultSite = manager.Sites["Default Web Site"];
Application reports = defaultSite.Applications.Add(
"/reports", @"\\FileServer\Reports");
// Configure the default virtual directory for the application.
VirtualDirectory reportDir = reports.VirtualDirectories[0];
reportDir.LogonMethod = AuthenticationLogonMethod.Batch;
reportDir.UserName = @"HumanResources\Jane";
reportDir.Password = @"iL@1Fnw!";
manager.CommitChanges();
}
}
}
Gilt für:
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für