1

lets say i have a wcf service which has a one minute timeout for requests now how can i have one method which timeout for 5 secs instead of the global timeout ?

Stacker
  • 8,157
  • 18
  • 73
  • 135

1 Answers1

2

Hasan Khan's popular comment is on the right track but I'd recommend you create two separate contracts (i.e. IServiceContractWithRegularTimeout and IPingPong) instead. A single service class would implement both interfaces and you would configure two endpoints for the service: one for IServiceContractWithRegularTimeout and one for IPingPong. This SO question and answer shows an example of how you could do this.

Community
  • 1
  • 1
Sixto Saez
  • 12,610
  • 5
  • 43
  • 51