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

2

5

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.

Sweyn answered 27/6, 2012 at 14:9 Comment(5)
Under Windows Features, have you enabled Windows Communication Foundation Non-HTTP Activation ?Sycosis
Did you try to use WCFTestClient.exe tool to check your service?Associative
One more think - as I rememmber, baseAddress should follow this format : {PROTOCOL}://SERVER_NAME/SERVICE_NAME, am I right?Associative
@Gerrie, yes, I did that (updated the question with that info).Sweyn
@Andriy Thanks, the format doesn't need to follow that format in the case of net.pipe (it can be anything actually!), but I do follow that format, I just changed it for the post from the long/work-sensitive URN. I'll check out WcfTestClient now...Sweyn
A
8
  • 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?
Ammann answered 27/6, 2012 at 14:27 Comment(2)
AAAAAAGHHHHHHHH!!!! It was the net.pipe listener service :) Thanks a lot, seems this is disabled by default on win server 2008, which would make sense.Sweyn
@MattRoberts: Glad it helped! :) I've faced a similar problem with net.msmq. Listener Adapter activates your web services via Process activation service. Both should be running.Ammann
T
0

I was getting the same EndPointNotFound error on net.pipe://localhost/ for the SharePoint Secure Token Service.

It worked on my dev system but not production.

For me, it was because the Dell Change Auditor Agent service was running on my production servers.

https://blogs.msdn.microsoft.com/spses/2016/01/21/sharepoint-2013-unable-to-viewedit-office-documents-in-browser-using-office-web-apps-2013/

Trinitarianism answered 24/3, 2017 at 4:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.