Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I have created a VB.NET windows application using nusoap web services. There is a module in my application which runs every 2.5 sec (on timer tick event). On each tick event of the timer this module calls a web service method inside a background worker. It returns some records in XML and then this XML is bound to a DatagridView. Now the problem is sometime it shows this error message:
The underlying connection was closed : A connection that was expected to be kept alive was closed.


How can I solve this issue, because I didn't find keep alive method present in nusoap.

Thanks in advance!
Posted
Updated 20-Jan-11 7:45am
v2
Comments
DaveAuld 20-Jan-11 13:36pm    
What code are you running inside the tick event and the background worker etc. please update your question with the information, it will give folks more to go on.

1 solution

When you call the webservice do you do this using the .NET frameworks WebRequest. If you are you can set the KeepAlive property on the WebRequest object to false. This might resolve your issue.
It would help us to solve this if you would post the relevant code bits where the error occurs and the stacktrace of the exception would also help.

Best Regards,
Manfred
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900