我正在尝试使用 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>