473,225 Members | 1,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

The operation has timed out - Error

Hi,

I am calling a web service to get Latitude and Longitude by sending a zip
code. This is happening inside a loop (2000 - 3000 times). After say 80
times, it gives me an error - The operation has timed out. If I continue by
pressing F10, the process starts again and everything is fine. After some
time again it will stop, show me an error on the line where I am calling
webservice and if i say F10, it will again continue.

I wanted to know how can I stop this "The operation has timed out" error
from coming. I have also set the Time Out property of web service to a large
value (1000000 ms), but still it doesn't help. I'm using .Net 2.0

Thanks,
Pooja.
Aug 11 '06 #1
1 4055
Hello Pooja,

I hope the following suggestions would be helpful to you.
Timeout is the property which is related to the synchronous calls to the
webservice methods. No matter how long you set the timeout for method call,
the client may sometimes fail to receive the response in the stipulated time
limits.
I would rather suggest you to call the web method Asynchronously.
Here i assume that you know how to call the methods asynchronous.

Below are some examples.
*****
private void Button1_Click(object sender, EventArgs e)
{
// Synchronous call to webservice method.
Service.Service objService = new
TestInfragistics.Service.Service();
objService.Timeout = 1000000;
MessageBox.Show(objService.HelloWorld().ToString() );
MessageBox.Show(objService.Hello("Smith").ToString ());
objService.Dispose();

// Asynchronous call to webservice method.
Service.Service objService1 = new
TestInfragistics.Service.Service();
objService1.HelloCompleted += new
HelloCompletedEventHandler(objService1_HelloComple ted);
objService1.HelloAsync("Smith");
objService1.Dispose();

// Asynchronous call - 2 to webservice method.
Service.Service objService2 = new
TestInfragistics.Service.Service();
objService2.HelloWorldCompleted += new
HelloWorldCompletedEventHandler(objService2_HelloW orldCompleted);
objService2.HelloWorldAsync();
objService2.Dispose();
}
void objService2_HelloWorldCompleted(object sender,
HelloWorldCompletedEventArgs e)
{
if (e.Result != null)
MessageBox.Show(e.Result.ToString());
}

void objService1_HelloCompleted(object sender,
HelloCompletedEventArgs e)
{
if (e.Result != null)
MessageBox.Show(e.Result.ToString());
}
*****
Hope this would solve your problem.

Jay Kudecha.

"Pooja" wrote:
Hi,

I am calling a web service to get Latitude and Longitude by sending a zip
code. This is happening inside a loop (2000 - 3000 times). After say 80
times, it gives me an error - The operation has timed out. If I continue by
pressing F10, the process starts again and everything is fine. After some
time again it will stop, show me an error on the line where I am calling
webservice and if i say F10, it will again continue.

I wanted to know how can I stop this "The operation has timed out" error
from coming. I have also set the Time Out property of web service to a large
value (1000000 ms), but still it doesn't help. I'm using .Net 2.0

Thanks,
Pooja.
Aug 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: willitfw | last post by:
Does anyone know how to prevent this error from occurring: IOError: (10060, 'Operation timed out'). I am using the following code without any luck. Obviously I am missing something. import...
1
by: Joško Šugar | last post by:
I have a data transfer between an c# application and web service. The application is in local network and connects to the internet thru a gateway. Connection is ADSL. Web service is on the remote...
0
by: Matt | last post by:
(can't find any of my previous post for same issue. please CC to my email address as well. Thanks!) Hi all, What is the possible reason that HttpWebRequest.GetRequestStream() may hang there...
5
by: Sachin Surana | last post by:
We use HttpWebRequest to send the request at a URL. But some times the method GetResponse throws a time out exception. But when we check the IIS logs, there is no such entry. So the request never...
4
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading...
2
by: tlan | last post by:
Hi, I got this error when I move my web service to Windows2003 server. I spent hours scouting on the internet and could find any answer. Please help!!! I the webservice is timeout between 1...
11
by: Sumit Acharya | last post by:
I am using following script to connect to the server and i try the connection for 1000 times. Some times it succeeds for all the 1000 times,but some times it fails with error:- 10060, 'Operation...
3
by: JuHui | last post by:
I wrote a script to get 100 pages from a server. like below: 1:import httplib 2:conns = httplib.HTTPConnection("www.mytest.com") 3:conn.request("GET", "/") sometimes a socket error was...
10
by: Jim Underwood | last post by:
I am having a problem with my web page timng out while retrieving a long runnign report (90-120 seconds. I have tried modifying several settings in various places and cannot get it to run for more...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.