ClientCredentials.UserName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a credential object that you can use to set the user name and password that the client uses to authenticate itself to the service.
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
Property Value
A UserNamePasswordClientCredential that represents the current UserName credential.
Examples
The following code shows how to configure a credential.
// 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"
Remarks
You can use the object returned by this property to configure the credential by calling its members, such as UserName and Password.
Applies to
Comentários
https://aka.ms/ContentUserFeedback.
Em breve: Ao longo de 2024, eliminaremos os problemas do GitHub como o mecanismo de comentários para conteúdo e o substituiremos por um novo sistema de comentários. Para obter mais informações, consulteEnviar e exibir comentários de