如何将WCF json绑定到具有多个绑定的https?
我正在使用WCF将Web服务绑定到SOAP和JSON。 我必须在生产中运行ssl。 我已经将soap地址绑定到https,但我无法弄清楚如何将JSON地址绑定到https。 这是我的配置。
<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>
...
有没有protocolMapping我可以添加我的“json”端点,我可以使用绑定到https?
您的绑定中是否将安全模式设置为“传输”?
<webHttpBinding>
<binding name="jsonpSsl">
<security mode="Transport" />
</binding>
</webHttpBinding>
看看这个答案:通过SSL使用JSONP的WCF服务
链接地址: http://www.djcxy.com/p/71363.html上一篇: How do I bind WCF json to https with multiple bindings?
下一篇: Universal way to authenticate clients and secure a RESTful api