Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get net.pipe binding working in IIS7.5 on Windows Server 2008 R2

I'm trying to configure net.pipe bindings on the server between 2 processes (on the same box). I have all this working locally in Windows 7, but on the production server (Windows Server 2008 R2), it fails to work.

I can verify that I have:

  • Added a net.pipe binding to the IIS "Web Site" (added * as the information).
  • Added net.pipe to the list of bindings in "advanced settings" for the IIS "Web Site".

That's all that was required on my dev machine. Is there anything else I need to do?

The error I get is from a simple console app test client:

Unhandled Exception: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://nameOfService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.IO.PipeException: The pipe endpoint 'net.pipe://nameOfService.svc' could not be found on your local machine.`

Here's some configs:

Client:

<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>

Server:

<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>

Update:

The app pool associated with the web site that hosts the net.pipe binding is running under the "NetworkService" user, if that makes a difference.

I have enabled Non-HTTP activation under Windows Features for .NET 3.5.1, although this is running under .NET 4.

like image 655
Matt Roberts Avatar asked Jun 27 '12 14:06

Matt Roberts


1 Answers

  • Have you enabled the windows services Net.Pipe Listener Adapter and Windows Process Activation Service?
  • Have you enabled net.pipe binding on the site level?
  • Have you added net.pipeprotocol on the vdir level?
like image 151
abatishchev Avatar answered Sep 30 '22 05:09

abatishchev