set connection timeout when calling to webservice method

T

tony

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.
 
M

Manish Bafna

Hi,
Service1 obj = new Service1();
obj.TimeOut = -1; // infinite time out.Here you can set your connection time
out
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top