다음을 통해 공유


UserNamePasswordClientCredential.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

속성 값

String

암호입니다.

설명

이 속성을 얻거나 설정하려면 아래 코드와 같이 클라이언트 개체에서 UserName 속성에서 개체에 액세스 UserNamePasswordClientCredential 합니다.

WSHttpBinding myBinding = new WSHttpBinding();
myBinding.Security.Mode = SecurityMode.Message;
myBinding.Security.Message.ClientCredentialType =
    MessageCredentialType.UserName;

CalculatorClient client = new CalculatorClient("default");

client.ClientCredentials.UserName.Password = ReturnPassword();

client.ClientCredentials.UserName.UserName = ReturnUsername();
Dim myBinding As New WSHttpBinding()
myBinding.Security.Mode = SecurityMode.Message
myBinding.Security.Message.ClientCredentialType = MessageCredentialType.UserName


Dim client As New CalculatorClient("default")

client.ClientCredentials.UserName.Password = ReturnPassword()

client.ClientCredentials.UserName.UserName = ReturnUsername()

적용 대상