473,761 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ 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.Web Exception' occurred in
system.web.serv ices.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 1893
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.Web Exception' occurred in
system.web.serv ices.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.Cre ate("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.Web Exception' occurred in
system.web.serv ices.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
1517
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 asmx page and get the expected output on the page. With a console application, I can call the webservice and retrieve from it
26
16525
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 Win2K3/IIS6.0), do we still need this patch? 2) Does it specifically solve only this error: The underlying connection was closed. An unexpected error
3
9523
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 error messages differ depending on when I restart my machine. RIGHT AFTER RESTART: 'WindowsApplication1.exe': Loaded 'oevrvyg9', No symbols loaded. A first chance exception of type 'System.NullReferenceException' occurred in system.dll
2
321
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 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 :
0
1306
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 create a windows form that can consume and use the webservice. I can also access the webservice through my browser. But when I create an Asp.NET Web Application and try to consume the webservice, I am able to add the web reference, but when I call any...
0
1252
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 the webservice from IE from the same Windows Server box. I did some googling and tried the options suggested but with no luck. Any help would be much appreciated.
3
2100
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 assembly which in turn calls a web service. You know the web service is reachable and that the COM app is able to instantiate your .Net assembly (because you RegAsm'ed it and it's good to go). However, when you attempt to make a call to the web...
1
1956
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 accessing the webservice each min. It was working 100% fine. Problem: But now in actual deployment, we have deployed webservice in Win Server 2003 and we have used all the default configurations. Now the clients are accessing that service the same way...
4
4578
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:// www.dotnetspider.com/resources/2596-e-underlying-connection-was-closed-A-connection.aspx), it's a bug of .NET 2.0, and the author suggests that we use KeepAlive=false until Microsoft fixes it. It seems like almost 5 years have passes since the...
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3913
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 we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.