ClientCredentials.UserName Tulajdonság

Definíció

Lekéri az ügyfél által a szolgáltatásban való hitelesítéshez használt felhasználónév és jelszó beállításához használható hitelesítőadat-objektumot.

public:
 property System::ServiceModel::Security::UserNamePasswordClientCredential ^ UserName { System::ServiceModel::Security::UserNamePasswordClientCredential ^ get(); };
public System.ServiceModel.Security.UserNamePasswordClientCredential UserName { get; }
member this.UserName : System.ServiceModel.Security.UserNamePasswordClientCredential
Public ReadOnly Property UserName As UserNamePasswordClientCredential

Tulajdonság értéke

Az UserNamePasswordClientCredential aktuális UserName hitelesítő adatokat jelképező azonosító.

Példák

Az alábbi kód bemutatja, hogyan konfigurálhat hitelesítő adatokat.

// Configure the proxy with
// (username,password).
calcClient.ClientCredentials.UserName.UserName = "username";
calcClient.ClientCredentials.UserName.Password = "changethispassword";
' Configure the proxy with 
' (username,password).
calcClient.ClientCredentials.UserName.UserName = "username"
calcClient.ClientCredentials.UserName.Password = "changethispassword"

Megjegyzések

A tulajdonság által visszaadott objektummal konfigurálhatja a hitelesítő adatokat a tagok meghívásával, például UserName és Password.

A következőre érvényes: