Learner
Learner

Reputation: 1542

WCF channel faulted mode

I want to know the behavior of the WCF service's faulted mode.

Suppose the server where the service is hosted is down , so the CHANNEL which i am using to connect to service will be in faulted mode?

Following are my observations:

Question : is it expected scenario or the channel should show that it is in faulted state for the first call.

Please guide.

Upvotes: 0

Views: 298

Answers (1)

rekire
rekire

Reputation: 47945

By the design of TCP it is normally not possible to see if the server or the client loses its conectivity. So you have to make a call to see that. (The non normal way is to send a empty TCP package but that is normally not supported by any operation systems.)

You can just see it faster if you calls regualry a special nop (no operation) function.

If your call fails because of a connection timeout (which happens everytime if the other side is offline) than your channel gets faulted.

Upvotes: 1

Related Questions