473,473 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

WebService problem : The underlying connection was closed: An un..

Hello !
I have a WebService.
When I execute WS in browser on local machine - its OK!
When I execute WS in browser on the server machine /with remote desktop/ -
its OK!
When I execute WebService in WindowsForms app on the local machine /app and
WS/ - its OK !
But when I execute the Web service/server machine/ from WindowsForms app
/local machine/, it gives me this error :

" An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll
Additional information: The underlying connection was closed: An unexpected
error occurred on a receive. "

Do you know where is the problem and how can I fix it ???

Aug 2 '05 #1
2 1872
Hi u need to set keepalive=false in ur webrequest.Find the details in the
link below
which explains more...
www.dotnetforums.net/80674.html
http://cephas.net/blog/net

"Toma Marinov" wrote:
Hello !
I have a WebService.
When I execute WS in browser on local machine - its OK!
When I execute WS in browser on the server machine /with remote desktop/ -
its OK!
When I execute WebService in WindowsForms app on the local machine /app and
WS/ - its OK !
But when I execute the Web service/server machine/ from WindowsForms app
/local machine/, it gives me this error :

" An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll
Additional information: The underlying connection was closed: An unexpected
error occurred on a receive. "

Do you know where is the problem and how can I fix it ???

Aug 2 '05 #2
Hello again !
I try what you write to me, but the error is still the same ...
Here I paste code how I using it :

//Creating object with the WebService Uri
HttpWebRequest wr =
(HttpWebRequest)WebRequest.Create("http://.../webservices");
wr.KeepAlive = false;

s = new MyWebService ();
s.Timeout = -1;
str = s.MyWSmethod() // <--- here is the error

If I'm wrong with something - please write me...
Thank you in advance!
Toma

"Santhi Maadhaven" wrote:
Hi u need to set keepalive=false in ur webrequest.Find the details in the
link below
which explains more...
www.dotnetforums.net/80674.html
http://cephas.net/blog/net

"Toma Marinov" wrote:
Hello !
I have a WebService.
When I execute WS in browser on local machine - its OK!
When I execute WS in browser on the server machine /with remote desktop/ -
its OK!
When I execute WebService in WindowsForms app on the local machine /app and
WS/ - its OK !
But when I execute the Web service/server machine/ from WindowsForms app
/local machine/, it gives me this error :

" An unhandled exception of type 'System.Net.WebException' occurred in
system.web.services.dll
Additional information: The underlying connection was closed: An unexpected
error occurred on a receive. "

Do you know where is the problem and how can I fix it ???

Aug 2 '05 #3

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

Similar topics

5
by: David | last post by:
When I call a webservice with an ASP.NET application, I get the following error: "The underlying connection was closed: Unable to connect to the remote server. " With my brower, I can get the...
26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
3
by: subha | last post by:
I have a HelloWorld webservice that works on my IE browser. But, when I add a webreference to it and call the HelloWorld method from my WindowsFormsApp (return in C#), I get error messages. The...
2
by: Toma Marinov | last post by:
Hello ! I have a WebService. When I execute WS in browser on local machine - its OK! When I execute WS in browser on the server machine /with remote desktop/ - its OK! When I execute WebService...
0
by: Matthew B. Lehrman | last post by:
I've googled all over the place trying to get answer to this question and some things have come close, but nothing quite. Asp.NET 1.1, Visual Studio 2003 I am writing Visual Basic apps. I can...
0
by: K S | last post by:
All, I am getting the following error when I tried to deploy my webpage (Release Version) on Windows Server 2003. The below error occurs when I try to access the webservice. PS: I can access...
3
by: Monty | last post by:
OK, I had an issue with this and found lots of advice that did not apply, so I'm posting what I found hoping it might help someone else. Here's the sitch: you have a COM app that calls to a .Net...
1
by: Mahesh Devjibhai Dhola | last post by:
Hi, Scenario: The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and...
4
by: Sin Jeong-hun | last post by:
I don't get the message so it's hard to debug that, but some of my clients report that they get "The underlying connection was closed unexpectedly" exception. According to this site (http://...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.