473,406 Members | 2,404 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,406 software developers and data experts.

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 1868
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
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,...

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.