简体   繁体   English

尝试通过https设置WCF服务时出错

[英]Error trying to set up WCF service over https

I am trying to set up a WCF service over https. 我正在尝试通过https设置WCF服务。 However I keep getting the error: "Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http]." 但是,我不断收到错误消息: “找不到与绑定BasicHttpBinding的端点的方案https匹配的基地址。注册的基地址方案为[http]。”

Here is the content of my web.config file: 这是我的web.config文件的内容:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    ...
<behaviors>
  <serviceBehaviors>
    <behavior name="MyServiceBehavior">
      <serviceMetadata httpsGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service name="SoftwareMyService.MyService" behaviorConfiguration="MyServiceBehavior">
    <host>
      <baseAddresses>
        <add baseAddress="https://........./" />
      </baseAddresses>
    </host>
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="StreamedHttp" contract="SoftwareMyService.IMyService" />
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
  </service>
</services>
<bindings>
  <basicHttpBinding>
    <binding name="StreamedHttp" transferMode="Streamed" maxReceivedMessageSize="2147483647">
      <security mode="Transport">
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration> 

Any ideas on what I'm doing wrong? 关于我在做什么错的任何想法吗?

I would expect that this shuold at least have a MyService.svc value. 我希望这个shuold至少具有MyService.svc值。

<endpoint address="" binding="basicHttpBinding" 
  bindingConfiguration="StreamedHttp" contract="SoftwareMyService.IMyService" />

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM