Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// SecurityMode.Transport enables HTTPS
var binding = new WSHttpBinding(SecurityMode.Transport)
{
Security =
{
Mode = SecurityMode.Transport,
Message = {ClientCredentialType = MessageCredentialType.None},
Transport =
{
ClientCredentialType = HttpClientCredentialType.InheritedFromHost,
ProxyCredentialType = HttpProxyCredentialTYpe.None,
Realm = string.Empty
}
}
};
// Enable authentication
var passageServiceClient = new PassageServiceClient(
binding,
new EndpointAddress("https://[SYNERGY URL]/PassageService")
);
// Add credentials
passageServiceClient.ClientCredentials.UserName = "[USERNAME]";
passageServiceClient.ClientCredentials.Password = "[PASSWORD]";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment