簡體   English   中英

VB.net中的WCF命名管道問題

[英]WCF in VB.net named pipe issue

我正在嘗試使用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>

據我了解,您錯過了在已啟用的協議列表中添加net.pipe協議的信息。 請執行以下步驟,並確認設置是否正確。

  1. 轉到IIS(在運行窗口中鍵入inetmgr
  2. 從左窗格中選擇並右鍵單擊您的服務。
  3. 從右鍵單擊上下文菜單中選擇“管理應用程序---->高級設置”菜單。
  4. 在“高級設置”窗口中,選擇“ 啟用的協議”屬性。
  5. 默認情況下,將添加http協議。 用逗號分隔符添加net.pipe 例如: http,net.pipe

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM