简体   繁体   中英

Why are some WCF Named Pipe clients getting a TimeoutException

I have a WCF name pipe service, to communicate 2 processes on windows.

I've tested it on my machine and it worked, I've developed an installer for it, and it's working for most users, but some users are getting a TimeoutException with this message:

"request operation sent to net.pipe://localhost/myService did not receive a reply within the configured timeout (00:00:10). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client."

What can be the reason for this error? Is it a security issue? Where can I set security settings for named pipes?

Thanks

Some users may not receive a reply in time due to network problems, which may cause a timeout.

You can configure the timeout setting in configuration file by setting the send and receive timeout on binding element.

Apply the binding configuration on both service and client-side:

  <netNamedPipeBinding>
    <binding sendTimeout="00:20:00" receiveTimeout="00:20:00">
     <reliableSession inactivityTimeout="00:20:00"/>
    </binding>
   </netNamedPipeBinding>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM