【发布时间】:2017-06-12 10:05:14
【问题描述】:
我有几天的时间试图解决我的 WCF 的问题,当绑定是 HTTP 时它确实有效。但是,一旦我购买了 SSL 证书并将我的网站配置为在 HTTPS 中运行,当我更改 IIS 上的绑定时,我的应用程序就无法使用。
我收到以下错误消息:
Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https].
我的 web.config
<services>
<service behaviorConfiguration="WebServiceBehavior" name="WcfService1.Service">
<endpoint address="" behaviorConfiguration="jsonBehavior" binding="webHttpBinding"
bindingConfiguration="webHttpBindingWithJsonP" contract="WcfService1.IService"/>
<endpoint address="soap" binding="basicHttpBinding" contract="WcfService1.IService" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="jsonBehavior">
<webHttp helpEnabled="true"/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="WebServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="webHttpBindingWithJsonP"
crossDomainScriptAccessEnabled="true" />
</webHttpBinding>
</bindings>
可以让我的 WCF 使用 HTTPS 吗?
【问题讨论】: