I need to reproduce this app.config
service file via C#
code.
<system.serviceModel>
....
<protocolMapping>
<add scheme="https" binding="wsHttpBinding" />
</protocolMapping>
...
Specially the scheme
part, so i did this:
var binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.Transport;
...
But if i try to do a binding.Scheme = ...
i get the compile time error the property Scheme has no setter
.
How to set it via code?