Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am getting following exception when I am exposing my WCF service with NetNamedPipeBinding.

Project Environment:
1. WCF service hosted in IIS 7.5 (Windows 7 Machine)
2. Simple Coonsole Application is the client.
3. WCF library is hosted in IIS using thte .svc file<.

4. I have a simple service with one method which returns a simple string in the WCF service.

Approaches I have tried:
1. Starting the service Net named Pipe Listener.
2. Security mode set to None.
3. Increased the timeouts in the server and client, both the configs.


Service Config:
HTML
<system.serviceModel>   
<bindings>
      <netNamedPipeBinding>
        <binding name="Binding1"
                 closeTimeout="00:10:00"
                 openTimeout="00:10:00"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:10:00"
                 transactionFlow="false"
                 transferMode="Buffered"
                 transactionProtocol="OleTransactions"
                 hostNameComparisonMode="StrongWildcard"
                 maxBufferPoolSize="524288"
                 maxBufferSize="65536"
                 maxConnections="10"
                 maxReceivedMessageSize="65536">
          <security mode="None">
          </security>
        </binding>
      </netNamedPipeBinding>
    </bindings>
    <client />
    <services>
      <service name="WCFDemo.DemoService">
        <endpoint address="http://localhost:58765/DemoService" binding="wsHttpBinding"
          name="DemoWsHtppEP" contract="WCFDemo.IDemoService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="http://localhost:58765/DemoService/mex" binding="mexHttpBinding"
          name="DemoMexHttpBinding" contract="IMetadataExchange" />
        <endpoint address="net.tcp://localhost/DemoService" binding="netTcpBinding"
          bindingConfiguration="" name="DemoNetTcpEP" contract="WCFDemo.IDemoService" />
        <endpoint address="net.pipe://localhost/DemoService" binding="netNamedPipeBinding"
          bindingConfiguration="Binding1" name="DemoNetNamedPipeEP"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:58765" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>


Client Config:
HTML
<system.serviceModel>
        <bindings>
            <basicHttpBinding>
               <binding name="BasicHttpBinding_IDemoService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="None">
                        <transport realm="" />
                    </security>
                </binding>
            </basicHttpBinding>
            <netNamedPipeBinding>
                <binding name="Binding1" closeTimeout="00:10:00" openTimeout="00:10:00"
                    receiveTimeout="00:10:00" sendTimeout="00:10:00" transactionFlow="false"
                    transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
                    maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
                    <security mode="None">
                        <transport protectionLevel="EncryptAndSign" />
                    </security>
                </binding>
                <binding name="NetNamedPipeBinding_IDemoService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
                    maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="Transport">
                        <transport protectionLevel="EncryptAndSign" />
                    </security>
                </binding>
            </netNamedPipeBinding>
            <netTcpBinding>
                <binding name="NetTcpBinding_IDemoService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Transport">
                        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        <message clientCredentialType="Windows" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
        <client>
            <endpoint address="net.pipe://gcotdvm3722126.nam.nsroot.net/WCFDemo/DemoServiceHost.svc"
                binding="netNamedPipeBinding" bindingConfiguration="Binding1"
                contract="WCFDemoService.IDemoService" name="DemoNetNamedPipeEP" />
            <endpoint address="http://gcotdvm3722126.nam.nsroot.net/WCFDemo/DemoServiceHost.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDemoService"
                contract="WCFDemoService.IDemoService" name="BasicHttpBinding_IDemoService" />
            <endpoint address="net.tcp://gcotdvm3722126.nam.nsroot.net/WCFDemo/DemoServiceHost.svc"
                binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IDemoService"
                contract="WCFDemoService.IDemoService" name="DemoNetTcpEP" />
            <endpoint address="net.pipe://gcotdvm3722126.nam.nsroot.net/WCFDemo/DemoServiceHost.svc"
                binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IDemoService"
                contract="WCFDemoService.IDemoService" name="NetNamedPipeBinding_IDemoService">
                <identity>
                    <servicePrincipalName value="host/GCOTDVM3722126.nam.nsroot.net" />
                </identity>
            </endpoint>
        </client>
Posted
Comments
Krunal Rohit 28-Feb-14 8:14am    
what exception ?

-KR
TapasU 3-Mar-14 1:56am    
Hey its in the subject / Title of the post..

There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900