title: How to define client side timeout on an async ASP.NET web service call?
body: <p>Today I've searched some time to a specific case we have for calling an (external) ASP.NET web service with the following requirements:</p>
  
  <ul>
  <li>Calls must be done asynchronous</li>
  <li>A timeout must implemented, because web service can take long time to execute</li>
  </ul>
  
  <p>On the internet and StackOverflow many questions appear on this subject, but are either dated or are suggesting using the <code>WebRequest.TimeOut</code> property which is only applicable for synchronous calls.</p>
  
  <p>One alternative is using an <code>System.Threading.Timer</code>. Starting the timer just before starting the call and cancelling it when it reaches the <code>TimerCallback</code>.</p>
  
  <p>However, I think there should be a more common approach to such cases. Unfortunately couldn't find it so far. Anyone has an idea for setting client side timeouts on async web service calls?</p>
  
  <p>Thanks in advance.</p>