UsernameToken and SSL in WCF 4 web service - but with basicHttpBinding
A few months ago I asked about UsernameToken and SSL in WCF 4 web service and received a good answer using wsHttpBinding.
However now we have had to revert to using basicHttpBinding due to incompatibilities with a Java client. I've tried switching the configuration as follows....
<bindings> <basicHttpBinding> <binding name="secureBinding"> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None"/> <message clientCredentialType="UserName"/> </security> </binding> </basicHttpBinding> </bindings>
And then using this config in the service...
<service name="ServiceName"> <endpoint binding="basicHttpBinding" bindingConfiguration="secureBinding" contract="ContractType" /> </service>
However when I try to make a call to this service I am getting back an error...
The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via
Is there something else I need to configure to make this work with basicHttpBinding?
(Please note: My original requirements are still the same - SSL, usernametoken)
As per my comments (below the original question) this was actually a problem when using WCFStorm as the client.
The solution to this was found as one of the answers on this question The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via
This was to click on the "Config" settings option (NOT THE "Client Config") in WCFStorm. After clicking on that, click on the "Security" tab on the dialog that pops up. Make sure "Authentication Type" is set to "None" (The default is "Windows Authentication").