如果使用此配置会发生什么:
<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>
问题是,如果要同时通过HTTP和HTTPS调用服务,则必须提供两个端点-一个端点用于HTTP,另一个端点用于HTTPS。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)