title: How to secure webHttpBinding?
body: <p>In my WCF service I am trying to to send data to the client using JSON over an SSL connection. I was able to secure the OData database source to my client using <code>wsHttpBinding</code> with a security mode of <code>Transport</code>. Why is <code>webHttpBinding</code> not able to do the same in order to use SSL? How would I configure an endpoint that needs to use JSON to use an SSL connection as well? </p>
  
  <p>Essentially what is the difference between <code>webHttpBinding</code> and <code>wsHttpBinding</code>? </p>
  
  <p></p>
  
  <pre><code>&lt;bindings&gt;
    &lt;wsHttpBinding&gt;
      &lt;binding name="TransportSecurity"&gt;
        &lt;security mode="Transport"&gt;
          &lt;transport clientCredentialType="None" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/wsHttpBinding&gt;
  &lt;/bindings&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="ServiceBehavior"&gt;
        &lt;serviceMetadata httpsGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  
    &lt;endpointBehaviors&gt;
      &lt;behavior name="EndpBehavior"&gt;
        &lt;webHttp /&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
  &lt;/behaviors&gt;
  
  &lt;services&gt;
    &lt;service behaviorConfiguration="ServiceBehavior" name="DataService4.DataService"&gt;
  
      &lt;endpoint address="" binding="webHttpBinding" contract="DataService4.IService" bindingConfiguration="TransportSecurity" behaviorConfiguration="EndpBehavior" /&gt;
  
      &lt;endpoint contract="IMetadataExchange" binding="mexHttpsBinding" address="mex" /&gt;   
    &lt;/service&gt;
  &lt;/services&gt;
  
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
  </code></pre>
  
  <p></p>