I had to do some SMTP relay troubleshooting and it wasn't obvious how to view…
Using a Different Configured Binding in WCF Client
To programmatically switch bindings on the fly, you can do it via the constructor of the generated client:
var client = new WeatherClient(“MyEndpoint”);
“MyEndpoint” is the name of the endpoint defined in your config file:
<client>
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="http1" contract="MyContract" name="MyEndpoint" />
</client>
This Post Has 0 Comments