Comment sécuriser webHttpBinding?

Dans mon service WCF je suis en train d'envoyer des données vers le client à l'aide de JSON via une connexion SSL. J'ai été en mesure de sécuriser la base de données OData source de mon client à l'aide de wsHttpBinding avec un mode de sécurité de Transport. Pourquoi est - webHttpBinding pas en mesure de faire de même pour l'utilisation de SSL? Comment puis-je configurer un point de terminaison qui nécessite l'utilisation de JSON pour utiliser une connexion SSL?

Essentiellement quelle est la différence entre webHttpBinding et wsHttpBinding?

<bindings>
  <wsHttpBinding>
    <binding name="TransportSecurity">
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>

<behaviors>
  <serviceBehaviors>
    <behavior name="ServiceBehavior">
      <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>

  <endpointBehaviors>
    <behavior name="EndpBehavior">
      <webHttp />
    </behavior>
  </endpointBehaviors>
</behaviors>

<services>
  <service behaviorConfiguration="ServiceBehavior" name="DataService4.DataService">

    <endpoint address="" binding="webHttpBinding" contract="DataService4.IService" bindingConfiguration="TransportSecurity" behaviorConfiguration="EndpBehavior" />

    <endpoint contract="IMetadataExchange" binding="mexHttpsBinding" address="mex" />   
  </service>
</services>

<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

OriginalL'auteur Jaiesh_bhai | 2013-09-30