CredentialContext Class
Represents the security credentials for a Web service and the Web service client that are associated with a SoapContext.
Namespace: Microsoft.Web.Services3
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Namespace: Microsoft.Web.Services3
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)
Use the SetCredentials to set the Web service or Web service client's credentials for a policy in code. For client credentials that should not be set in a policy file, such as a user name and password, the recommended method is to set the client's credentials in code. This applies to the <usernameOverTransportSecurity> Element, and <usernameForCertificateSecurity> Element turnkey security assertions. For more details about setting the Web service's credentials in a policy file and the client credentials in code, see How to: Secure a Client Using Mixed Policy and Code.