VirtualDirectory.LogonMethod プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
構成された物理的な場所にアクセスするために仮想ディレクトリが使用する認証方法を取得または設定します。
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
プロパティ値
現在の AuthenticationLogonMethod 仮想ディレクトリの値の 1 つ。 既定では、 ClearTextです。
例
次の例では、仮想ディレクトリの プロパティを LogonMethod 設定する方法を示します。
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();
}
}
}