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)

Answers


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").


Need Your Help

Finish test case method when condition is reached java testng

java user-interface testng

I have test method, which start GUI window and next start a endless loop. I want to finish test method when GUI is closing. Any ideas how can I reach it? I try to set a boolean variable and when quit

How to fetch forms data submitted in a wordpress plugin file?

php wordpress forms

I want to submit a form which contains a textarea to my Wordpress plugin. But I don't know exactly HOW. I want my plugin to fetch the $_POST variable after the submission of the form that I create ...