Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF configuring timeout "per Operation"

Tags:

wcf

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) ?

like image 662
Doron Levi Avatar asked May 06 '10 07:05

Doron Levi


1 Answers

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.

like image 98
marc_s Avatar answered Nov 09 '22 10:11

marc_s