简体   繁体   English

WCF-找不到与https端点的方案http匹配的基地址

[英]WCF - Could not find a base address that matches scheme http for the https endpoint

When i try to run my service, i get an following error: "Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https]." 当我尝试运行我的服务时,出现以下错误:“找不到与绑定BasicHttpBinding的端点的方案http匹配的基地址。注册的基地址方案为[https]。”

My service declaration: 我的服务声明:

 <service name="service" behaviorConfiguration="serviceEndpointBehavior">

    <host>
      <baseAddresses>
        <add baseAddress="https://abc:12704/service"/>
      </baseAddresses>
    </host>

    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding2" contract="service"/>
    <endpoint address="mex" contract="IMetadataExchange" binding="basicHttpBinding"/>

  </service>

Binding: 捆绑:

  <basicHttpBinding>
    <binding name="basicHttpBinding2" maxReceivedMessageSize="1000000">
      <readerQuotas maxArrayLength="1000000" maxStringContentLength="1000000"/>
    </binding>
  </basicHttpBinding>

I have also following declaration in behavior: 我也有以下行为声明:

<behavior name="serviceEndpointBehavior">
      <dataContractSerializer maxItemsInObjectGraph="1000000"/>
      <serviceMetadata httpsGetEnabled="true" />
</behavior>

Any ideas? 有任何想法吗?

The binding you defined is a basic http binding. 您定义的绑定是基本的http绑定。 Your endpoint is http with added security (https). 您的端点是具有更高安全性(https)的http。 You need to define a security on your binding, or they won't match. 您需要在绑定上定义安全性,否则它们将不匹配。 You cannot have https without any security. 没有任何安全性就不能拥有https。

You need to find a good tutorial or book on this, because there is more to https than a few entries in the config file. 您需要找到一本很好的教程或书籍,因为https的内容比配置文件中的几个条目还要多。 You will need a certificate and you will need a web server that actually does this (hint: Cassini, the inbuild VS webserver will NOT do any https... it will simply drop it without giving any warnings). 您将需要一个证书,并且您将需要一个实际执行此操作的Web服务器(提示:Cassini,内置VS Web服务器将不执行任何https ...操作,将其丢弃而不会发出任何警告)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WCF:找不到与绑定WebHttpBinding的端点的方案http匹配的基地址。 注册的基址方案为[https] - WCF: Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https] 从 http 到 https,得到“找不到与具有绑定 WebHttpBinding 的端点的方案 http 匹配的基地址” - Going from http to https, getting "Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding" 找不到与绑定WSHttpBinding的端点的scheme http匹配的基址 - Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding 找不到与绑定MetadataExchangeTcpBinding自托管端点的终结点计算机匹配方案net.tcp的基地址 - Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding self hosting 找不到与绑定MetadataExchangeTcpBinding的端点的方案net.tcp匹配的基地址 - Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding WCF 服务基地址与端点地址 - WCF Service Base Address vs endpoint address WCF http和https端点一个合同 - WCF http & https endpoint one contract WCF面临的问题:找不到默认端点 - Facing issue with WCF: Could not find default endpoint WCF服务基地址Http和netTcp - WCF Service Base Address Http and netTcp WCF 端点错误:找不到默认端点元素 - WCF Endpoint Error: Could not find default endpoint element
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM