WCF Service Error: Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]

Written by stevey on October 7th, 2011

Setup a WCF service this morning and published to IIS6 where it is secured by a server certificate, that is https://localhost:8080/WcfSecured/Demo/DemoService.svc, then I got this confusing and commonly seen error:

Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https].

Well, thing was simpler than it portraits – as it turned out, there was a mis-configuration in the binding; I shouldn’t have used such binding for service hosted in SSL:

<binding name=”NoSecure”>
<security mode=”None”>
<transport clientCredentialType=”None”></transport></security>
</binding>

This is because the WCF service is hosted in a site that requires SSL, and this binding violates the SSL requirement. But the error message is too generic and if not by experimenting, I probably will still be search the web for an answer.

What I did was simply added another binding :

<binding name=”SecureTransportOnly”>

<security mode=”Transport”>

<transport clientCredentialType=”None” />

</security>
</binding>
(it will still work if did not specify clientCredentialType at all)

 

And have the service end point uses the new binding.

 

Leave a Comment