Como proteger o webHttpBinding?
Em meu serviço WCF, estou tentando enviar dados para o cliente usando JSON por meio de uma conexão SSL. Consegui proteger a origem do banco de dados OData para meu cliente usandowsHttpBinding
com um modo de segurançaTransport
. Por que éwebHttpBinding
não é capaz de fazer o mesmo para usar SSL? Como eu configuraria um endpoint que precisa usar o JSON para usar uma conexão SSL também?
Essencialmente, qual é a diferença entrewebHttpBinding
ewsHttpBinding
?
<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" />