3

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?

Steve
  • 1,557
  • 2
  • 17
  • 34

1 Answers1

2

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

Community
  • 1
  • 1
Boone
  • 1,046
  • 1
  • 12
  • 30
  • I had to add that binding configuration and a non-ssl binding to the endpoint then it worked. – Steve Aug 13 '13 at 20:43