How do I bind WCF json to https with multiple bindings?

I am using WCF to bind webservices to SOAP and JSON. I must run ssl in production. I've bound the soap address to https, but I cannot figure out how to bind the JSON address to https. Here is my config.

<protocolMapping>
  <add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
  <service name="EnterpriseServices.Service.AuthorizationServiceBase">
    <endpoint address="soap" binding="basicHttpBinding" contract="EnterpriseServices.Contracts.Authorization.IAuthorizationManagerBase" />
    <endpoint address="soap" binding="basicHttpsBinding" contract="EnterpriseServices.Contracts.Authorization.IAuthorizationManagerBase" />
    <endpoint address="json" binding="webHttpBinding" behaviorConfiguration="jsonBehavior" contract="EnterpriseServices.Contracts.Authorization.IAuthorizationManagerBase" />
  </service>
...

Is there a protocolMapping I can add for my "json" endpoint that I can use to bind to https?


Do you have the security mode set to Transport in your bindings?

<webHttpBinding>
  <binding name="jsonpSsl">
     <security mode="Transport" />
  </binding>
</webHttpBinding>

Check out this answer: WCF service with JSONP over SSL

链接地址: http://www.djcxy.com/p/71364.html

上一篇: POST参数内容是否有最大尺寸?

下一篇: 如何将WCF json绑定到具有多个绑定的https?