Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WCF Security exception when calling from Windows Service
- BasicHttpBinding httpBinding = new BasicHttpBinding();
- httpBinding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
- httpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
- httpBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
- httpBinding.Security.Transport.Realm = service_realm;
- EndpointAddress address = new EndpointAddress(service_address);
- Service.ServiceClient client = new Service.ServiceClient(httpBinding, address);
- client.ClientCredentials.UserName.UserName = service_username;
- client.ClientCredentials.UserName.Password = service_password;
Add Comment
Please, Sign In to add comment