Asynchronous call timeout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JMMB

    Asynchronous call timeout

    I'm using the following code to call different ws methods asynchronously. It
    works fine.
    How could I set a timeout for the asynchonous calls? I tried wait.one, but
    didn't work.
    thanks a lot.


    private void Button1_Click(o bject sender, System.EventArg s e)
    {
    localhost.Woodg roveOnlineBank bank = new localhost.Woodg roveOnlineBank( );
    IAsyncResult ar = bank.BeginGetAc count(1, null, bank);
    //...Do various asynchonous calls...

    //...Get the results...
    localhost.Acct acct = bank.EndGetAcco unt(ar);
    Label1.Text = string.Format(" The account {0} has a balance of {1:c}",
    acct.descriptio n, acct.balance);
    }


Working...