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
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor