Answered NetNamedPipeBinding CommunicationException Error

  • Friday, September 28, 2007 8:34 AM
     
     

     

    I have a client that accesses a singleton service. Everything is behaving as expected except when I close the proxy after a period of inactivity. Then I get this error:

     

    CommunicationException containing this error: "There was an error writing to the pipe: Unrecognized error 232 (0xe8)."

     

    Presumably this is a timeout but I can't figure out what property I should set to stop this.

Answers

  • Friday, September 28, 2007 3:43 PM
     
     Answered

    The default server-side timeout for Receive is 10 minutes. So the server will abort the channel if it doesn't get any data within ReceiveTimeout (configurable on the service host). To write robust close code, your client should try/catch for CommunicationExecption and TimeoutException around the Close call and call channel.Abort for cleanup in this case.

All Replies

  • Friday, September 28, 2007 3:43 PM
     
     Answered

    The default server-side timeout for Receive is 10 minutes. So the server will abort the channel if it doesn't get any data within ReceiveTimeout (configurable on the service host). To write robust close code, your client should try/catch for CommunicationExecption and TimeoutException around the Close call and call channel.Abort for cleanup in this case.

  • Monday, October 01, 2007 9:56 AM
     
     

    Hi Kenny,

     

    Thanks for this. I was in fact catching and aborting but I was also writing the full message to the screen too. (I'm in development mode at the moment). I've now specified receivetimeout in App.Config.