Paul Turner
Paul Turner

Reputation: 39625

In WCF, does a timeout fault the channel?

In WCF, does a timeout on a request-response operation fault the channel at the client's end?

If a server times out when sending a response, is the channel faulted at the server's end?

Upvotes: 3

Views: 1731

Answers (3)

toATwork
toATwork

Reputation: 1367

It depends which Timeout.

If you hit the SendTimeout or ReceiveTimeout of your binding (in my case NetTcpBinding), then yes, the channel will fault.

BUT, if you hit the OperationTimeout of your Service (in my case DuplexChannel) then you will just get a TimeoutException and the channel will NOT fault.

Upvotes: 0

marc_s
marc_s

Reputation: 754598

Yes, a timeout will fault the channel - and there's always only one channel linking a client and a server - the server doesn't have a channel of its own...

You basically have:

+-----------+                       +-----------+
|           |_______________________|           |
|  Client   |     The Channel       |  Server   |
|           |-----------------------|           |
+-----------+                       +-----------+

There's really only one channel which connects the two bits. As for timeouts - if both ends define a different value for the same timeout, the smaller value will "win" and become relevant - the higher value (on the other end) isn't taken into account.

Upvotes: 6

ChrisNel52
ChrisNel52

Reputation: 15153

Correct, the timeout will fault the channel. You can set the max timeout time on both the client and the server side.

Upvotes: 1

Related Questions