我有一个WCF服务,它在http绑定上正常运行。我试图更新这个使用SSL,但我得到以下错误:更改WCF服务以要求SSL
“无法找到一个与绑定WSHttpBinding端点匹配方案http的基地址,注册的基地址方案是[https]。”
这只发生在我将站点设置为“需要SSL”在IIS 7.5中,如果我取消选中它,它工作正常。
这里是我的配置
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior" >
<dataContractSerializer maxItemsInObjectGraph="2147483646"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndpointBinding">
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ServiceBehavior" name="WcfService1.Service1">
<host>
<baseAddresses>
<add baseAddress="http://localhost/WcfService1/"/>
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" bindingConfiguration=""
name="wsHttpEndpoint" contract="WcfService1.IService1" />
<endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration=""
name="MexHttpsBindingEndpoint" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
我已经试过而各种但是没有一样让我在那里,任何帮助是非常感谢!
我遵循你的建议和服务现在在https上工作!非常感谢您的帮助! – WillMcKill