473,388 Members | 1,340 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,388 software developers and data experts.

Calling a Web Service Asynchronously - .NET 2.0

2
Hi there,

Hoping someone might have an idea of whats going on here, I presume I'm in the right forum but not 100%.

I have a java web service that I am using with a C# .NET client. Synchronously everything works fine, but Asynchronously I'm having problems.

Intermittently I am getting the following error message in the asynchronous event handler for the call:

"Unable to write data to the transport connection: An established connection was aborted by the software in your host machine"

The fact that it is intermittent is what is confusing me.

To be more precise I'm calling 3 asynchronous methods at once, 2 of which are the same web service operation but with different parameters, like so:

///////////////////////////// In Constructor
wsObject.getPointCompleted += new getPointCompletedEventHandler(wsObject_getPointCom pleted);

wsObject.getPeriodCompleted += new getPeriodCompletedEventHandler(wsObject_getPeriodC ompleted);

///////////////////////////// In a method call
try
{
wsObject.getPointAsync(pointRequestOne, Guid.NewGuid());
wsObject.getPointAsync(pointRequestTwo, Guid.NewGuid());
wsObject.getPeriodAsync(periodRequest, Guid.NewGuid());
}
catch (Exception e)
{
MessageBox.Show("Server Side Exception - Operation failed");
}

Would it have anything to do with the fact that they are all being called one after the other in such close proximity?

Any advice is much appreciated,
Thanks,
James
Nov 3 '06 #1
1 1557
JamesK
2
Sorry, should have mentioned, usually only 1 of the calls fail, occassionally 2 fail, and from memory I think they have been the 2 with the same web service call (don't think I ever remember the other one failing).

Thanks again.
Nov 3 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
3
by: belgiozen | last post by:
Hi, I have a working windows service,it is looking for files on the disk and when some of the files are cupdated it calls an executable. But it takes a lot of time(about 10 minutes) to run the...
1
by: | last post by:
How can I handle an error while I calling web service asynchronously?
0
by: han zhiyang | last post by:
I've just studied the "how to" web service and the async pattern in donnet.I make a test with these knowledges,but I got a strange result. Here is my test. 1.Write a simple "Add" service named...
0
by: han zhiyang | last post by:
I have two new questions. 1. my exception handling codes works well when I synchronously call a web service,but How can I use it in asynchronously calling? I tried in the same way,but when error...
0
by: dba123 | last post by:
Do I : 1) use a Delegate which calls my method below (the method below is using the EnterpriseLibrary.Data namespace for 2.0) or 2) Use some sort of implementation of BackGroundWorker...
0
by: Ginny | last post by:
Hi, I have a simple web service that returns a dataset. Its very simple. i call the web service from a windows app. it works abosolutely fine when i can the web service method synchronously. but...
3
by: John Skandar | last post by:
I've found a free WebService on the net for a currency converter and have created a class to use it with the WSDL tool. I call the WebService method asynchronously: ...
0
by: =?Utf-8?B?aWFtc2Rr?= | last post by:
I have a windows client that calls web service 1 (Broker) synchronously, web service 1 then calls web service 2 (Service) asynchronously, web service 2 sleeps its thread for 10 seconds. When I put...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.