473,703 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The underlying connection was closed: An unexpected error occurred on a receive.

Hi,

We are using the following error randomly, when accessing a webservice
method/servlet hosted on JBoss application server:

The underlying connection was closed: An unexpected error occurred on a
receive.

We are using .NET v1.1.

Does anyone have idea about the reason/solution for this exception?

Thanks,
Vijaya Krishna P.
Nov 23 '05 #1
5 24755
Hi Vijay,

This is a known issue. Try (on the client side) turning off the proxy
property that controls keep alives. Another option is to create/destroy
the proxy between calls. The proxy is losing the underlying connection
(HTTP can do that) and it doesn't retry when it has a connection already.

I hope this helps

Dan Rogers
Microsoft Corporation

--------------------
From: "Vijayakris hna Pondala" <pv******@hotma il.com>
Subject: The underlying connection was closed: An unexpected error occurred
on a receive.
Date: Wed, 15 Dec 2004 10:50:52 +0530
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <#d************ *@TK2MSFTNGP14. phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: lanner.hyd.desh aw.com 149.77.163.104
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 4
.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8104
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

Hi,

We are using the following error randomly, when accessing a webservice
method/servlet hosted on JBoss application server:

The underlying connection was closed: An unexpected error occurred on a
receive.

We are using .NET v1.1.

Does anyone have idea about the reason/solution for this exception?

Thanks,
Vijaya Krishna P.

Nov 23 '05 #2
Won't there be any performance effect, due to creating a new connection for
every call?

Thanks,
Vijaya Krishna P.
Nov 23 '05 #3
Yes. Creating a connection requires 7 round trips - which amounts to
introducing 7 x your network latency, plus the time it takes for the port
listener in IIS to accept the connection. So, if you do this repeatedly,
you'll see an increase in network traffic, server CPU utilization, and some
perceptable-to-user delay in WAN situations.

The essence of the known issue is that if a connection times out, it gets
closed. This typically happens with you make a bunch of calls, pause, and
then go some more. During the pause, if the server closes the connection
(it is allowed to do this), then the proxy still tries to use the same
connection, and fails. If you can predict when the pause is, you can limit
recreating the connection to when you need to.

At least it gives you a way to manage the issue until we get a service pack
that has a fix in it out.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: "Vijayakris hna Pondala" <pv******@hotma il.com>
References: <#d************ *@TK2MSFTNGP14. phx.gbl>
<AN************ **@cpmsftngxa10 .phx.gbl>
Subject: Re: The underlying connection was closed: An unexpected error
occurred on a receive.
Date: Thu, 16 Dec 2004 12:29:55 +0530
Lines: 7
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <#K************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: lanner.hyd.desh aw.com 149.77.163.104
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 0
.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8124
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

Won't there be any performance effect, due to creating a new connection for
every call?

Thanks,
Vijaya Krishna P.

Nov 23 '05 #4
Hi Dan,

In our code, we are creating the WebService class, every time a method of
the class is called. In the constructor of the WebService class, we have
been setting the Proxy property to
GlobalProxySele ction.GetEmptyW ebProxy(). Is this code creating the problem
in any manner?

Thanks,

Vijaya Krishna P>
"Dan Rogers" <da***@microsof t.com> wrote in message
news:AN******** ******@cpmsftng xa10.phx.gbl...
Hi Vijay,

This is a known issue. Try (on the client side) turning off the proxy
property that controls keep alives. Another option is to create/destroy
the proxy between calls. The proxy is losing the underlying connection
(HTTP can do that) and it doesn't retry when it has a connection already.

I hope this helps

Dan Rogers
Microsoft Corporation

--------------------
From: "Vijayakris hna Pondala" <pv******@hotma il.com>
Subject: The underlying connection was closed: An unexpected error occurred on a receive.
Date: Wed, 15 Dec 2004 10:50:52 +0530
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <#d************ *@TK2MSFTNGP14. phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: lanner.hyd.desh aw.com 149.77.163.104
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 4 phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8104
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

Hi,

We are using the following error randomly, when accessing a webservice
method/servlet hosted on JBoss application server:

The underlying connection was closed: An unexpected error occurred on a
receive.

We are using .NET v1.1.

Does anyone have idea about the reason/solution for this exception?

Thanks,
Vijaya Krishna P.

Nov 23 '05 #5
Hi Vijay,
It might be an issue. I'm not sure what an empty WebProxy class does - I
suspect you have to set up the properties of that class for your
connections to succeed.

Regards,

Dan
--------------------
From: "Vijayakris hna Pondala" <pv******@hotma il.com>
References: <#d************ *@TK2MSFTNGP14. phx.gbl>
<AN************ **@cpmsftngxa10 .phx.gbl>
Subject: Re: The underlying connection was closed: An unexpected error
occurred on a receive.
Date: Mon, 20 Dec 2004 12:08:19 +0530
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <uB************ **@TK2MSFTNGP12 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: lanner.hyd.desh aw.com 149.77.163.104
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED02.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 2
.phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8198
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

Hi Dan,

In our code, we are creating the WebService class, every time a method of
the class is called. In the constructor of the WebService class, we have
been setting the Proxy property to
GlobalProxySele ction.GetEmptyW ebProxy(). Is this code creating the problem
in any manner?

Thanks,

Vijaya Krishna P>
"Dan Rogers" <da***@microsof t.com> wrote in message
news:AN******** ******@cpmsftng xa10.phx.gbl...
Hi Vijay,

This is a known issue. Try (on the client side) turning off the proxy
property that controls keep alives. Another option is to create/destroy
the proxy between calls. The proxy is losing the underlying connection
(HTTP can do that) and it doesn't retry when it has a connection already.

I hope this helps

Dan Rogers
Microsoft Corporation

--------------------
From: "Vijayakris hna Pondala" <pv******@hotma il.com>
Subject: The underlying connection was closed: An unexpected error occurred on a receive.
Date: Wed, 15 Dec 2004 10:50:52 +0530
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <#d************ *@TK2MSFTNGP14. phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.webservices
NNTP-Posting-Host: lanner.hyd.desh aw.com 149.77.163.104
Path:
cpmsftngxa10.ph x.gbl!TK2MSFTFE ED01.phx.gbl!TK 2MSFTNGP08.phx. gbl!TK2MSFTNGP1 4 phx.gbl
Xref: cpmsftngxa10.ph x.gbl
microsoft.publi c.dotnet.framew ork.webservices :8104
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.webservices

Hi,

We are using the following error randomly, when accessing a webservice
method/servlet hosted on JBoss application server:

The underlying connection was closed: An unexpected error occurred on a
receive.

We are using .NET v1.1.

Does anyone have idea about the reason/solution for this exception?

Thanks,
Vijaya Krishna P.


Nov 23 '05 #6

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

Similar topics

1
2975
by: Angel | last post by:
I'm trying to connect to a fixed IP address (eg. http://10.60.903.50/TempFile) in order to retrieve one accii line of text in TempFile. I try to read the information with this code: string fullpath = " http://10.60.93.51/TempFile "; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(fullpath); //req.KeepAlive = false; HttpWebResponse res; StreamReader sr; string strResult = "";
26
16510
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
0
2438
by: Chris John | last post by:
G'day, I've got a bit of a curly problem. I have a smart client application that talks to a Java/Axis server. Everything has been working fine except for one of our clients machines we get the error 'The underlying connection was closed: An unexpected error occurred on a receive.' The error occurs during the logon process. The user puts in there id & password and presses go. I can see that she successfully logs into the java
1
8874
by: Fredrik L | last post by:
Hi, We have an application outside the firewall who talks to a webservice inside the firewall. 9 times of 10 this works, but sometimes we got the error "The underlying connection was closed: An unexpected error occurred on a receive." We have tested some of the solutions that we have found in this discussion group but the problem still exist. We use .NET Framework 1.1. The application server use Win2003. The webservice server use...
0
1425
by: tharika | last post by:
Hi, We have an ASP.NET web application hosted on a development server, that invokes web services hosted on an offshore server in India, both being on the same intranet domain. The default page of the application makes a call to a service and is painted successfully. Navigation to any other application page, which invokes the same service throws the error, "Underlying connection was closed. An unexpected error occurred on receive"....
1
6721
by: matt | last post by:
hello, i am using a .NET 1.1 winform to perform webrequests via the System.Net.WebClient class (not a webservice, actually). It uploads values via a POST command & a URL, then receives the html back. nothing too complicated there. except, i am frequently getting the dreaded error: The underlying connection was closed: an unexpected error occurred
3
4071
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running for long duration (may be more than 4 hours). We are getting exceptions during the HTTP send/receive inside the web service method. The exception...
0
2065
by: imonline | last post by:
Hi, I have created a asp.net page which posts XML on the web service using .net 2.0. The page and the webservice was working fine but once I converted them to .net 3.5 I have been getting following exception. And I am having this problem on the local machine that is both of them on same machine. Exception: System.Net.WebException was caught
0
9251
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9121
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7867
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
6588
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
5922
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
4687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3123
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
2
2450
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2069
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.