set connection timeout when calling to webservice method

Discussion in 'ASP .Net Web Services' started by tony, Feb 27, 2007.

  1. tony

    tony Guest

    hi.

    when i call to web service method, while there is no internet connection,
    it takes like 40 secs- 2 minutes before i get answer.

    can i change the timeout so, incase of no internet connection, the method
    return in 10 second ? (for example)

    thanking in advance.
     
    tony, Feb 27, 2007
    #1
    1. Advertising

  2. tony

    Manish Bafna Guest

    Hi,
    Service1 obj = new Service1();
    obj.TimeOut = -1; // infinite time out.Here you can set your connection time
    out
    --
    Thanks and Regards.
    Manish Bafna.
    MCP and MCTS.



    "tony" wrote:

    > hi.
    >
    > when i call to web service method, while there is no internet connection,
    > it takes like 40 secs- 2 minutes before i get answer.
    >
    > can i change the timeout so, incase of no internet connection, the method
    > return in 10 second ? (for example)
    >
    > thanking in advance.
    >
    >
    >
     
    Manish Bafna, Feb 28, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guoqi Zheng
    Replies:
    4
    Views:
    13,124
    Guoqi Zheng
    Jun 3, 2004
  2. VincentWong

    Timeout Problem of calling the webservice

    VincentWong, Dec 17, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    175
    VincentWong
    Dec 17, 2003
  3. subha

    Timeout when calling a webservice from C#

    subha, Nov 16, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    4,534
    Dan Rogers
    Nov 16, 2004
  4. Lars-Erik Aabech
    Replies:
    3
    Views:
    429
    [MSFT]
    Apr 29, 2005
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,363
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page