大佬教程收集整理的这篇文章主要介绍了使用JSONP over SSL的WCF服务,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
当我们从http请求此服务时,它返回JSONP,但是当使用httpS请求它时它只返回JSON.我需要以任何一种方式使用JSONP,请帮忙.
目前的配置是这样的:
<webhttpBinding> <binding name="webhttpBindingWithJsonP" crossDomainScriptAccessEnabled="true" /> </webhttpBinding> <behaviors> <serviceBehaviors> <behavior name="JsonserviceBehaviors"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> <endpointBehaviors><behavior name="webhttpBehavior"> <webhttp /> </behavior></endpointBehaviors> </behaviors> <services> <service name="BACkend.CIservice" behaviorConfiguration="JsonserviceBehaviors"> <endpoint address="" binding="webhttpBinding" bindingConfiguration="webhttpBindingWithJsonP" contract="BACkend.ICIservice" behaviorConfiguration="webhttpBehavior"/> </service></services>
<webhttpBinding> <binding name="jsonp" crossDomainScriptAccessEnabled="true" /> <binding name="jsonpSsl" crossDomainScriptAccessEnabled="true"> <security mode="Transport" /> </binding> </webhttpBinding> <behaviors> <serviceBehaviors> <behavior name="JsonserviceBehaviors"> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="webhttpBehavior"> <webhttp /> </behavior> </endpointBehaviors> </behaviors> <services> <service name="BACkend.CIservice" behaviorConfiguration="JsonserviceBehaviors"> <endpoint address="" binding="webhttpBinding" bindingConfiguration="jsonp" contract="BACkend.ICIservice" behaviorConfiguration="webhttpBehavior"/> <endpoint address="" binding="webhttpBinding" bindingConfiguration="jsonpSsl" contract="BACkend.ICIservice" behaviorConfiguration="webhttpBehavior"/> </service> </services>
以上是大佬教程为你收集整理的使用JSONP over SSL的WCF服务全部内容,希望文章能够帮你解决使用JSONP over SSL的WCF服务所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。