C# WCF错误。找不到与绑定为WSHttpBinding的终结点的方案http匹配的基址

C# WCF错误。找不到与绑定为WSHttpBinding的终结点的方案http匹配的基址,c#,web-services,wcf,tfs,wshttpbinding,C#,Web Services,Wcf,Tfs,Wshttpbinding,一般来说,我对构建Web服务和WCF还不熟悉,尽管到目前为止我做得很好,但我遇到了以下问题,我似乎无法克服 找不到与绑定为WSHttpBinding的终结点的方案http匹配的基址。注册的基址方案为[] 我已将app.config设置为这样 <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation deb

一般来说,我对构建Web服务和WCF还不熟悉,尽管到目前为止我做得很好,但我遇到了以下问题,我似乎无法克服

找不到与绑定为WSHttpBinding的终结点的方案http匹配的基址。注册的基址方案为[]

我已将app.config设置为这样

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>

      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>
      <system.serviceModel>
        <bindings>
          <wsHttpBinding>
            <binding name="WcfSoapServiceBinding">
              <security mode="None" />
            </binding>
          </wsHttpBinding>
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="WcfSoapServiceBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <services>
          <service behaviorConfiguration="WcfSoapServiceBehavior" name="WcfSoapService.Service1">
            <endpoint binding="wsHttpBinding" bindingConfiguration="WcfSoapServiceBinding"
              contract="WcfSoapService.IService1" />
          </service>
        </services>
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>
    </configuration>

我将安全模式设置为“无”,因此它使用HTTP而不是HTTPS,并且我还将httpGetEnabled设置为true。一段时间以来,我在网上找到了一些不同的选择,但到目前为止都没有任何效果。我正在使用Ewald Hofman关于如何使用WCF订阅TFS的示例

我觉得我很接近,但这是我唯一无法克服的。我的最终目标是从TFS获取Soap请求并解析其数据。作为WCF和Web服务器的新手,我不确定这个错误实际上告诉我什么是错误的。所以我有两个问题

1) 这个错误意味着什么是错误的?更具体地说,“注册的基址方案是[]”是什么意思


2) 我怎样才能着手纠正错误呢

在服务部分为端点添加基址或添加地址元素

 <services>
          <service behaviorConfiguration="WcfSoapServiceBehavior" name="WcfSoapService.Service1">

         <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8182/MyService"/>
          </baseAddresses>
        </host>

            <endpoint address=""
 binding="wsHttpBinding" bindingConfiguration="WcfSoapServiceBinding"
              contract="WcfSoapService.IService1" />
          </service>


您没有为端点指定地址-您是在IIS中托管服务还是在自托管?添加服务失败。服务元数据可能无法访问。确保服务正在运行并公开元数据。添加另一个终结点以公开有关服务的元数据。是的,不幸的是,同样的错误,但我会尝试其他端点,因为我还没有尝试过这个解决方案。