0
我想使用WCF测试客户端来测试我的WCF服务,这里是我的app.config。这很好,但是当我将baseAddress更改为“net.pipe:// localhost/VSWCFPipe”时,它不再起作用。将baseAddress更改为命名管道的正确方法是什么?我只想使用net.pipe,因为这仅适用于本地计算机上的IPC。在VB.net命名管道问题的WCF
<?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>
嗨,谢谢你的帮忙!我启动了IIS,但该服务未显示在左侧窗格中。另外,我需要net.tcp吗?我试图只使用命名管道。谢谢。 –
@DannyBoy对不起,这是一个错字。你需要提到net.pipe而不是net.tcp。请参阅下面的链接以了解如何在IIS中托管WCF服务http://msdn.microsoft.com/en-us/library/ms733766.aspx –