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

    Question

  • Hi,

    We have a strange scenario.
    When a service returns say 100 records all seems fine, but as soon as we try and return say, 30,000 records the following exception is encountered:

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

    This is the configuration settings we make use of:

        <bindings>  
          <netNamedPipeBinding>
            <binding name="netTcp" closeTimeout="00:10:00" openTimeout="00:10:00" transactionFlow ="true"
                maxBufferPoolSize="67108864" maxBufferSize="67108864" maxReceivedMessageSize="67108864">
              <readerQuotas maxArrayLength="67108864" maxStringContentLength="67108864" />
            </binding>      
          </netNamedPipeBinding>
        </bindings>
    I.W Coetzer
    Thursday, December 03, 2009 8:16 AM

Answers

  • Finally managed to get it working by making use of the following:

    Note the bindings & behaviour configuration is required!

        <bindings>
          <netTcpBinding>
            <binding name="PortSharing" portSharingEnabled="true" maxBufferPoolSize="67108864" maxBufferSize="67108864" maxReceivedMessageSize="67108864" sendTimeout="00:02:00" receiveTimeout="00:02:00">
              <readerQuotas maxArrayLength="67108864" maxStringContentLength="67108864" />
            </binding>
          </netTcpBinding>
        </bindings>
    
        <behaviors>
          <endpointBehaviors>
            <behavior name="LargeItemGraph">
              <dataContractSerializer maxItemsInObjectGraph="67108864"/>
            </behavior>
          </endpointBehaviors>
          <serviceBehaviors>
            <behavior name="LargeItemGraph">
              <dataContractSerializer maxItemsInObjectGraph="67108864"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
    Then also don't forget to assign these attributes to the actual service and client endpoints!!

        <client>
          <endpoint address="net.tcp://localhost/MyService"
                    behaviorConfiguration="LargeItemGraph"
                    binding="netTcpBinding"
                    bindingConfiguration="PortSharing"
                    contract="NameSpace.InterfaceName"
          />
        </client>
    
    
    
        <services>
          <service name="MyServiceName" behaviorConfiguration="LargeItemGraph">
            <endpoint address="net.tcp://localhost/MyServiceName"
                      binding="netTcpBinding"
                      bindingConfiguration="PortSharing"
                      contract="NameSpace.InterfaceName"
            />
          </service>
        </services>

    I.W Coetzer
    • Marked as answer by I.W Coetzer Monday, December 07, 2009 6:20 AM
    Monday, December 07, 2009 6:20 AM

All replies

  • I have asked the developer to try the following bindings, still awaiting feedback.

        <bindings>   
          <netNamedPipeBinding>
            <binding name="netTcp" closeTimeout="00:10:00" openTimeout="00:10:00" transactionFlow ="true" receiveTimeout="00:10:00" sendTimeout="00:10:00"
                maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
              <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="2147483647" />
            </binding>       
          </netNamedPipeBinding>
        </bindings>
    


    I.W Coetzer
    Thursday, December 03, 2009 8:29 AM
  • Finally managed to get it working by making use of the following:

    Note the bindings & behaviour configuration is required!

        <bindings>
          <netTcpBinding>
            <binding name="PortSharing" portSharingEnabled="true" maxBufferPoolSize="67108864" maxBufferSize="67108864" maxReceivedMessageSize="67108864" sendTimeout="00:02:00" receiveTimeout="00:02:00">
              <readerQuotas maxArrayLength="67108864" maxStringContentLength="67108864" />
            </binding>
          </netTcpBinding>
        </bindings>
    
        <behaviors>
          <endpointBehaviors>
            <behavior name="LargeItemGraph">
              <dataContractSerializer maxItemsInObjectGraph="67108864"/>
            </behavior>
          </endpointBehaviors>
          <serviceBehaviors>
            <behavior name="LargeItemGraph">
              <dataContractSerializer maxItemsInObjectGraph="67108864"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
    Then also don't forget to assign these attributes to the actual service and client endpoints!!

        <client>
          <endpoint address="net.tcp://localhost/MyService"
                    behaviorConfiguration="LargeItemGraph"
                    binding="netTcpBinding"
                    bindingConfiguration="PortSharing"
                    contract="NameSpace.InterfaceName"
          />
        </client>
    
    
    
        <services>
          <service name="MyServiceName" behaviorConfiguration="LargeItemGraph">
            <endpoint address="net.tcp://localhost/MyServiceName"
                      binding="netTcpBinding"
                      bindingConfiguration="PortSharing"
                      contract="NameSpace.InterfaceName"
            />
          </service>
        </services>

    I.W Coetzer
    • Marked as answer by I.W Coetzer Monday, December 07, 2009 6:20 AM
    Monday, December 07, 2009 6:20 AM
  • Can you suggest how to overcome this error???
    Saturday, July 06, 2013 2:36 PM