我在WCF中遇到错误

时间:2015-06-10 04:56:37

标签: wcf

错误:

  

下载时出错   ' https://mum-19377/memoqservices/SecurityService/_vti_bin/ListData.svc/ $元数据&#39 ;.请求失败,HTTP状态为404:未找到。元数据包含   无法解决的引用:   ' https://mum-19377/memoqservices/SecurityService&#39 ;.没有   端点监听https://mum-19377/memoqservices/SecurityService   那可以接受这个消息。这通常是由不正确引起的   地址或SOAP操作。有关更多信息,请参阅InnerException(如果存在)   细节。远程服务器返回错误:(404)Not Found。如果   服务在当前解决方案中定义,尝试构建解决方案   并再次添加服务参考。

我的配置:

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="metadataBehavior">
        <serviceMetadata httpsGetEnabled="true"/>
        </behavior>
      </serviceBehaviors>

    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="CommonBindingConfig" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="16000000" maxBufferSize="4000000" maxReceivedMessageSize="4000000" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
          <readerQuotas maxDepth="0" maxStringContentLength="4000000" maxArrayLength="4000000" maxBytesPerRead="4000000" maxNameTableCharCount="0"/>
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="UserName" algorithmSuite="Default"/>
          </security>
        </binding>
      </basicHttpBinding>



      <wsHttpBinding>

        <binding name="TransportSecurity">
          <security mode="Transport">
            <transport clientCredentialType="Certificate"/>

          </security>
        </binding>
      </wsHttpBinding>


    </bindings>

    <client>

      <endpoint address="http://mum-19377/memoqservices/Security/SecurityService" binding="basicHttpBinding" bindingConfiguration="CommonBindingConfig" contract="SecurityService.ISecurityService" name="SecurityService"/>
      <endpoint address="http://mum-19377/memoqservices/tb/TBService" binding="basicHttpBinding" bindingConfiguration="CommonBindingConfig" contract="TBService.ITBService" name="TBService"/>
      <endpoint address="http://mum-19377/memoqservices/FileManagerService" binding="basicHttpBinding" bindingConfiguration="CommonBindingConfig" contract="FileManagerService.IFileManagerService" name="FileManagerService"/>
      <endpoint address="http://mum-19377/memoqservices/ResourceService" binding="basicHttpBinding" bindingConfiguration="CommonBindingConfig" contract="ResourceService.IResourceService" name="ResourceService"/>
      <endpoint address="http://mum-19377/memoqservices/TMService" binding="basicHttpBinding" bindingConfiguration="CommonBindingConfig" contract="TMService.ITMService" name="TMService"/>
      <endpoint address="http://mum-19377/memoqservices/ServerProjectService" binding="basicHttpBinding" bindingConfiguration="CommonBindingConfig" contract="ServerProjectService.IServerProjectService" name="ServerProjectService"/>

      <endpoint address="https://mum-19377/memoqservices/SecurityService" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="SecurityService.ISecurityService" name="SecurityService1"/>
      <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>


    </client>
  </system.serviceModel>

1 个答案:

答案 0 :(得分:0)

您指定 mex 作为元数据交换终结点的地址。 因此,请尝试在 https://yourServiceBaseAdress/mex 等地址下检索wsdl,以克服404.