Doron Levi
Doron Levi

Reputation: 468

WCF configuring timeout "per Operation"

I have a service in which 1 operation can take a lot of time and the others should end very quickly, can I configure using an OperationBehavior (or something else) the timeout (send\receive) to be different (at operation level) ?

Upvotes: 6

Views: 1092

Answers (1)

marc_s
marc_s

Reputation: 755541

No, the timeouts can only be specified in a binding configuration, and a binding configuration is attached to an endpoint - so all the service methods on that endpoint get the same timeouts.

The only thing you could do is split up your service into two contracts and expose two on two separate endpoints ("FastEndpoint" vs. "SlowEndpoint") and then use different settings for each endpoint to handle this situation.

Upvotes: 7

Related Questions