WCF Http Bindings, Require SSL

Posted by JoshKraker on Stack Overflow See other posts from Stack Overflow or by JoshKraker
Published on 2009-06-11T01:30:59Z Indexed on 2010/03/27 5:03 UTC
Read the original article Hit count: 558

Filed under:
|
|

I have the following binding I'm using with my wsHttpBinding webservice.

<binding name="wsHttpConfig">
  <security>
    <transport clientCredentialType="None"/>
  </security>
</binding>

The issue is that it allows for the client to connect using either Http or Https. I would like to require them to use SSL. I tried adding the following:

<system.web.extensions>
  <scripting>
    <webServices>
      <authenticationService enabled="true" 
         requireSSL = "true"/>
    </webServices>
  </scripting>
</system.web.extensions>

But it had no effect; client could still connect with Http. I then tried checking the "Require SSL" in the IIS7 SSL Settings and had client certificates radio set to Accept. Now, when I try to view the service I am getting the error "Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]."

Anyone know exactly how to fix this error? I have been googling for the last 3 hours trying 500 different combinations (not 500, but too many to list) and could not get anything to run.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about wcf-binding