元数据包含无法解析的引用。
没有终结点在侦听可以接受消息的
net.tcp://localhost:8000/service。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参阅
InnerException 以了解详细信息。
如果希望获取更多帮助,请键入“svcutil
/?”
一查原来是没配置元数据端点,这是我重新更改后正确的服务端配置文件,可以比对一下:
<?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>
红色部分是后来添加上去的,至此就成功了。