By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,315 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,315 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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: "Vijayakrishna Pondala" <pv******@hotmail.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.public.dotnet.framework.webservices
NNTP-Posting-Host: lanner.hyd.deshaw.com 149.77.163.104
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8104
X-Tomcat-NG: microsoft.public.dotnet.framework.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

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

Thanks,
Vijaya Krishna P.
Nov 23 '05 #3

P: n/a
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: "Vijayakrishna Pondala" <pv******@hotmail.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.public.dotnet.framework.webservices
NNTP-Posting-Host: lanner.hyd.deshaw.com 149.77.163.104
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8124
X-Tomcat-NG: microsoft.public.dotnet.framework.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

P: n/a
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
GlobalProxySelection.GetEmptyWebProxy(). Is this code creating the problem
in any manner?

Thanks,

Vijaya Krishna P>
"Dan Rogers" <da***@microsoft.com> wrote in message
news:AN**************@cpmsftngxa10.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: "Vijayakrishna Pondala" <pv******@hotmail.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.public.dotnet.framework.webservices
NNTP-Posting-Host: lanner.hyd.deshaw.com 149.77.163.104
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14 phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8104
X-Tomcat-NG: microsoft.public.dotnet.framework.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

P: n/a
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: "Vijayakrishna Pondala" <pv******@hotmail.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.public.dotnet.framework.webservices
NNTP-Posting-Host: lanner.hyd.deshaw.com 149.77.163.104
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8198
X-Tomcat-NG: microsoft.public.dotnet.framework.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
GlobalProxySelection.GetEmptyWebProxy(). Is this code creating the problem
in any manner?

Thanks,

Vijaya Krishna P>
"Dan Rogers" <da***@microsoft.com> wrote in message
news:AN**************@cpmsftngxa10.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: "Vijayakrishna Pondala" <pv******@hotmail.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.public.dotnet.framework.webservices
NNTP-Posting-Host: lanner.hyd.deshaw.com 149.77.163.104
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP14 phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8104
X-Tomcat-NG: microsoft.public.dotnet.framework.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 discussion thread is closed

Replies have been disabled for this discussion.