WCF--找不到具有绑定 BasicHttpBinding 的终结点的与方案 https 匹配的基址。注册的基址方案是 [http]。
<system.serviceModel> <services> <service name="xxxxx.xxxxxx"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="aHttpBinding" contract="xxxxx.xxxxxx" name="xxxxx.xxxxx"></endpoint> </service> </services> <bindings> <basicHttpBinding> <binding name="aHttpBinding" maxReceivedMessageSize="1000000"> <readerQuotas maxStringContentLength="1000000" /> <security mode="Transport"> <!---------------------------------------------此处改为None-----------------------> <transport clientCredentialType="None"/> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior> <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false --> <serviceMetadata httpsGetEnabled="false" /> <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 --> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel>
原因不知道为什么,把mode改为None就可以