Diese Dokumentation wurde archiviert und wird nicht länger gepflegt.

AuthenticationLogonMethod-Enumeration

Represents the authentication type that you can use to establish a logon session for a secured virtual directory.

Namespace: Microsoft.Web.Administration
Assembly: Microsoft.Web.Administration (in microsoft.web.administration.dll)

public enum AuthenticationLogonMethod
public enum AuthenticationLogonMethod
public enum AuthenticationLogonMethod

 MembernameBeschreibung
BatchAllows processes to execute on behalf of a user without their direct intervention. The user must have user rights to log on as a batch job (used, for example, by COM+ applications). This logon type is intended for applications where logon performance is vital. The underlying call to the LogonUser API will not cache credentials for a user logged in with the Batch logon type. 
ClearTextAllows a user with only network user rights to log on with clear text credentials. The server is allowed to accept the user credentials, call the LogonUser API function, verify that the user can access the Web server across the network, and still communicate with other servers using the stored clear text credentials. 
InteractiveAllows a user to log on interactively with the web server. The underlying call to the LogonUser API function caches credentials for disconnected operations. 
NetworkAllows a user to log on to a remote server on the network. This logon type is intended for high performance servers to authenticate clear text passwords. The underlying call to the LogonUser API function does not cache credentials for this logon type. 

You would typically use these logon modes when a virtual directory is mapped to a UNC path.

The following code example creates a new application under the default Web site and then configures the application's default virtual directory to use batch authentication to log on to a UNC path.


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();
        }
    }
}


Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.

.NET Framework

Unterstützt in: 3.0
Anzeigen: