다음을 통해 공유


VirtualDirectory.Password 속성

정의

가상 디렉터리가 구성된 물리적 위치에 액세스하는 데 사용하는 암호를 가져오거나 설정합니다.

public:
 property System::String ^ Password { System::String ^ get(); void set(System::String ^ value); };
public string Password { get; set; }
member this.Password : string with get, set
Public Property Password As String

속성 값

가상 디렉터리가 실제 위치에 액세스하는 데 사용하는 텍스트 지우기 암호입니다.

예제

다음 예제에서는 가상 디렉터리의 속성을 설정 Password 하는 방법을 보여 줍니다.


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

설명

UNC 경로와 같은 보안 콘텐츠에 액세스하기 위해 가상 디렉터리에 대체 자격 증명이 필요한 경우 이 속성을 사용해야 합니다. 가상 디렉터리에 대한 암호를 설정하면 구성 시스템에 저장된 값이 암호화됩니다.

주의

이 속성의 접근자에서 반환된 get 값은 텍스트가 지워집니다. 보안되지 않은 환경에서 이 값을 표시할 때는 주의해야 합니다.

적용 대상