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 –