WCF关于svcutil生成关于绑定出现 元数据包含没法解析的引用的解决方案

元数据包含没法解析的引用。tcp

 没有终结点在侦听能够接受消息的 net.tcp://localhost:8000/service。这一般是因为不正确的地址或者 SOAP 操做致使的。若是存在此状况,请参阅 InnerException 以了解详细信息。spa

若是但愿获取更多帮助,请键入“svcutil /?”xml

 

一查原来是没配置元数据端点,这是我从新更改后正确的服务端配置文件,能够比对一下:utf-8

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NewBinding0" maxReceivedMessageSize="1073741824" transferMode="Streamed" />
      </netTcpBinding>
    </bindings>
    <services>
      <service name="FileService2.FileSave" behaviorConfiguration="mexConfig"  >
        <endpoint address="FileSave"
                  binding="netTcpBinding"
                  bindingConfiguration="NewBinding0"
                  name="FileSaveName"
                  contract="FileInterface.IFileInterface" />
        <endpoint address="mex"
         binding="mexTcpBinding"
         name="MEX"
         contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8000/service" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="mexConfig">
          <serviceDebug includeExceptionDetailInFaults="True"/>
          <serviceMetadata />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
io

红色部分是后来添加上去的,至此就成功了。配置

相关文章
相关标签/搜索