2012-06-27 26 views
5

我試圖在兩個進程之間(在同一個盒子上)在服務器上配置net.pipe綁定。我在Windows 7中本地工作,但在生產服務器(Windows Server 2008 R2)上,它無法工作。無法在Windows Server 2008 R2上的IIS7.5中獲得net.pipe綁定工作

我可以確認我有:

  • 增加了一個net.pipe綁定到IIS「網站」(加*的信息)。
  • 將net.pipe添加到IIS「網站」的「高級設置」中的綁定列表中。

這就是我的開發機器上所需要的。還有什麼我需要做的?

我得到的錯誤是從一個簡單的控制檯應用程序測試客戶端:

未處理的異常:System.ServiceModel.EndpointNotFoundException:沒有終點的net.pipe聽://nameOfService.svc,可以接受消息。這通常是由不正確的地址或SOAP操作引起的。有關更多詳細信息,請參閱InnerException(如果存在)。 ---> System.IO.PipeException:管道端點 'net.pipe://nameOfService.svc' 無法在本地machine.`

在這裏找到的一些CONFIGS:

客戶:

<system.serviceModel> 
    <bindings> 
     <netNamedPipeBinding> 
      <binding name="NetNamedPipeBinding_IWebAppNotifyService"> 
       <security mode="None" /> 
      </binding> 
     </netNamedPipeBinding> 
    </bindings> 
    <client> 
     <endpoint address="net.pipe://nameOfService.svc" 
      binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IWebAppNotifyService" 
      contract="ServiceReference2.IWebAppNotifyService" name="NetNamedPipeBinding_IWebAppNotifyService" /> 
    </client> 
</system.serviceModel> 

服務器:

<bindings> 
    <netNamedPipeBinding> 
    <binding name="WebAppNotifyServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"> 
     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 
     <security mode="None"> 
     </security> 
    </binding> 
    <binding name="ScannerManagerCommandBinding"> 
     <security mode="None" /> 
    </binding> 
    </netNamedPipeBinding> 
</bindings> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="WebAppNotifyServiceBehavior"> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="True" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<services> 
    <service name="MonitoringApp.Notifier.WebAppNotifyService" behaviorConfiguration="WebAppNotifyServiceBehavior"> 
    <host> 
     <baseAddresses> 
     <add baseAddress="net.pipe://nameOfService.svc" /> 
     <add baseAddress="http://nameOfService" /> 
     </baseAddresses> 
    </host> 
    <endpoint address="" binding="netNamedPipeBinding" bindingConfiguration="WebAppNotifyServiceBinding" contract="X.Y.IWebAppNotifyService" /> 
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    </service> 
</services> 

更新:

與承載net.pipe綁定的網站相關聯的應用程序池在「NetworkService」用戶下運行,如果這有所幫助。

我已啓用非HTTP激活Windows下的特點爲.NET 3.5.1,雖然這是在.NET 4

+0

在Windows功能,你啓用了Windows Communication Foundation的非HTTP激活? –

+0

您是否嘗試使用WCFTestClient。exe工具來檢查你的服務? –

+0

還有一個想法 - 正如我記住的那樣,baseAddress應遵循以下格式:{PROTOCOL}:// SERVER_NAME/SERVICE_NAME,對嗎? –

回答

7
  • 運行是否啓用了Windows服務Net.Pipe Listener AdapterWindows Process Activation Service
  • 您是否在網站級別啓用了net.pipe綁定?
  • 您是否在vdir級別添加了net.pipe協議?
+0

AAAAAAGHHHHHHHH !!!!這是net.pipe監聽器服務:)非常感謝,似乎這是默認情況下禁用win服務器2008年,這是有道理的。 –

+0

@MattRoberts:很高興幫助! :)我遇到了net.msmq的類似問題。偵聽器適配器通過進程激活服務激活您的Web服務。兩者都應該運行。 – abatishchev

相關問題