我正在尝试使用WCF测试客户端来测试我的WCF服务,这是我的app.config。这很好用,但当我将baseAddress更改为“net.pipe:// localhost / VSWCFPipe”时,它不再有效。将baseAddress更改为命名管道的正确方法是什么?我只想使用net.pipe,因为这只适用于本地计算机上的IPC。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="WCFServiceBehavior"
name="WCFEngineService.WCFService">
<clear />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"
listenUriMode="Explicit">
<identity>
<dns value="localhost" />
<certificateReference storeName="My" storeLocation="LocalMachine"
x509FindType="FindBySubjectDistinguishedName" />
</identity>
</endpoint>
<endpoint address="net.pipe://localhost/VSWCFPipe" binding="netNamedPipeBinding"
bindingConfiguration="" contract="WCFEngineService.IWCF" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8888/WCFEngineService/Service" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
答案 0 :(得分:0)
根据我的理解,您错过了在启用的协议列表中添加 net.pipe 协议。请完成以下步骤并确认设置是否正确。