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

Underlying connection was closed

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev
Nov 21 '05 #1
26 16431
Hi Rajeev,

I am in the process of investigating your questions. I will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #2
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an ASP.NET client.

For the issues you are having, you should verify that your proxy settings are correct and that you are correctly specifying a valid server. Quite possibly these two issues
are related. If you are still having these problems, I might be able to help if you provide some more details.

Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #3

Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are mostly a result of user configuration problems.3) Yes, the fix does apply when the client is not an ASP.NET client.
For the issues you are having, you should verify that your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issuesare related. If you are still having these problems, I might be able to help if you provide some more details.
Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="---- =_NextPart_0001_6ADD76EC"Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG: microsoft.public.dotnet.framework.webservicesMessage-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6375NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I will get back to you as soon as I have an answer.
Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6290NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
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 erroroccured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connectto the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.
3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are
subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the
newsgroup/thread from which they originated.
--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are
subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.
Nov 21 '05 #4

Today, I seem to be seeing these errors instead (so the
same underlying connection errors - but says "The request
was canceled" and in the following alternating sequence:

Exception: System.Net.WebException: The operation has
timed-out.
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invok
e(String methodN
ame, Object[] parameters)

followed by:

Exception: System.Net.WebException: The underlying
connection was closed: The request was canceled.
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResp
onse(WebRequestrequest)
at
System.Web.Services.Protocols.HttpWebClientProtoco l.GetWeb
Response(WebRequest request)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invok
e(String methodName, Object[] parameters)

Again, does not happen all the time - I would say about
35% of the times under load.

Thx
Nov 21 '05 #5
You might be getting the "The underlying connection was closed. Unable to connect to the remote server" error because
too many connections are in the TIME_WAIT state. When this happens the system may run out of the random port range.
Clearing the KeepAlive flag might actually be aggravating this situation.

Please try entering "netstat -p TCP" at the command prompt and see how many TIME_WAIT connections are found.

Also, do you have code that we could use to reproduce these errors for further investigation?

Thank you for your patience.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl>
<BI**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 27 Aug 2004 12:41:42 -0700
Lines: 170
Message-ID: <17****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
thread-index: AcSMbeDGoXHBF+5uQYaTicjNqvUzdQ==
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6386
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are mostly a result of user configuration problems.3) Yes, the fix does apply when the client is not an ASP.NET client.
For the issues you are having, you should verify that your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issuesare related. If you are still having these problems, I might be able to help if you provide some more details.
Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="---- =_NextPart_0001_6ADD76EC"Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG: microsoft.public.dotnet.framework.webservicesMessage-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6375NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I will get back to you as soon as I have an answer.
Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6290NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
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 erroroccured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connectto the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.
3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are
subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the
newsgroup/thread from which they originated.
--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are
subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the
terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread
from which they originated.
Nov 21 '05 #6
Hi Rajeev,

This behavior may be due to a known issue which requires a service patch (Hotfix #3028) which you can request through
Microsoft Product Support Services. The issue occurs when you are sending more requests then can be handled, and the
requests are queued internally. If these queued requests timeout before even hitting the wire, you may encounter the
issue fixed in the service patch.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl>
<BI**************@cpmsftngxa10.phx.gbl> <17****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 27 Aug 2004 13:55:58 -0700
Lines: 33
Message-ID: <02****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSMeEDgyaPgu+LKR++naw+Hixg/jA==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6387
NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Today, I seem to be seeing these errors instead (so the
same underlying connection errors - but says "The request
was canceled" and in the following alternating sequence:

Exception: System.Net.WebException: The operation has
timed-out.
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invok
e(String methodN
ame, Object[] parameters)

followed by:

Exception: System.Net.WebException: The underlying
connection was closed: The request was canceled.
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResp
onse(WebRequestrequest)
at
System.Web.Services.Protocols.HttpWebClientProtoco l.GetWeb
Response(WebRequest request)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invok
e(String methodName, Object[] parameters)

Again, does not happen all the time - I would say about
35% of the times under load.

Thx

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the
terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread
from which they originated.
Nov 21 '05 #7
Did you get a solution to this issue ? I am seeing the exactly the
same behaviour. When ever I load my application with many requests I
start seeing the same errors.

Thanks.
da****@online.microsoft.com (Daniel Roth [MSFT]) wrote in message news:<T3**************@cpmsftngxa10.phx.gbl>...
You might be getting the "The underlying connection was closed. Unable to connect to the remote server" error because
too many connections are in the TIME_WAIT state. When this happens the system may run out of the random port range.
Clearing the KeepAlive flag might actually be aggravating this situation.

Please try entering "netstat -p TCP" at the command prompt and see how many TIME_WAIT connections are found.

Also, do you have code that we could use to reproduce these errors for further investigation?

Thank you for your patience.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl>
<BI**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 27 Aug 2004 12:41:42 -0700
Lines: 170
Message-ID: <17****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
thread-index: AcSMbeDGoXHBF+5uQYaTicjNqvUzdQ==
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6386
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are

mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an

ASP.NET client.

For the issues you are having, you should verify that

your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
are related. If you are still having these problems, I

might be able to help if you provide some more details.

Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----

=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I

will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to

connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy

configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

Nov 21 '05 #8
Did you get solution to this problem ? I am seeing exactly the same
problem when I load my system with many HTTP requests.

da****@online.microsoft.com (Daniel Roth [MSFT]) wrote in message news:<T3**************@cpmsftngxa10.phx.gbl>...
You might be getting the "The underlying connection was closed. Unable to connect to the remote server" error because
too many connections are in the TIME_WAIT state. When this happens the system may run out of the random port range.
Clearing the KeepAlive flag might actually be aggravating this situation.

Please try entering "netstat -p TCP" at the command prompt and see how many TIME_WAIT connections are found.

Also, do you have code that we could use to reproduce these errors for further investigation?

Thank you for your patience.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl>
<BI**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 27 Aug 2004 12:41:42 -0700
Lines: 170
Message-ID: <17****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
thread-index: AcSMbeDGoXHBF+5uQYaTicjNqvUzdQ==
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6386
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are

mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an

ASP.NET client.

For the issues you are having, you should verify that

your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
are related. If you are still having these problems, I

might be able to help if you provide some more details.

Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----

=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I

will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to

connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy

configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

Nov 21 '05 #9
We keep getting the same intermittent problem in production. We have
turned off HTTP KEEP ALIVES in IIS (this seems "hacky" to me).

we have a fat client using HTTP Binary remoting over port 80 to IIS.
the problem seems to emerge when we get about 50 users on the system
at once. (we have 2 load balanced servers that have low CPU
utilization) ...

the web servers are running W2K with the latest .NET 1.1 SP.

What gives???? stack below.

brian
Server stack trace:
at System.Runtime.Remoting.Channels.Http.HttpClientTr ansportSink.ProcessResponseException(WebException
webException, HttpWebResponse& response)
at System.Runtime.Remoting.Channels.Http.HttpClientTr ansportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
Nov 21 '05 #10
Hi Brian,

Your issue looks like a remoting issue to me. I recommend that you repost in the remoting newsgroup where you will get more relevant information.

Daniel Roth

--------------------
From: ka********@yahoo.com (Brian D.)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: Re: Underlying connection was closed
Date: 20 Sep 2004 03:46:34 -0700
Organization: http://groups.google.com
Lines: 29
Message-ID: <f9**************************@posting.google.com >
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl> <BI**************@cpmsftngxa10.phx.gbl>
<17****************************@phx.gbl> <T3**************@cpmsftngxa10.phx.gbl> <c0*************************@posting.google.com>
NNTP-Posting-Host: 195.245.247.40
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1095677194 30572 127.0.0.1 (20 Sep 2004 10:46:34 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Mon, 20 Sep 2004 10:46:34 +0000 (UTC)
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!news.glorb.com!postnews1.google.com!not-for-mail
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.webservices:6684
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

We keep getting the same intermittent problem in production. We have
turned off HTTP KEEP ALIVES in IIS (this seems "hacky" to me).

we have a fat client using HTTP Binary remoting over port 80 to IIS.
the problem seems to emerge when we get about 50 users on the system
at once. (we have 2 load balanced servers that have low CPU
utilization) ...

the web servers are running W2K with the latest .NET 1.1 SP.

What gives???? stack below.

brian
Server stack trace:
at System.Runtime.Remoting.Channels.Http.HttpClientTr ansportSink.ProcessResponseException(WebException
webException, HttpWebResponse& response)
at System.Runtime.Remoting.Channels.Http.HttpClientTr ansportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #11
Hello,

Did you try checking on the number of connections in the TIME_WAIT state using the netstat command I mentioned earlier? Also could you please confirm for me that you
are seeing exaclty the same error message?

Thank you for your patience.

Daniel Roth

--------------------
From: me*******@gmail.com (AShah)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: Re: Underlying connection was closed
Date: 18 Sep 2004 19:34:52 -0700
Organization: http://groups.google.com
Lines: 211
Message-ID: <c0*************************@posting.google.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl> <BI**************@cpmsftngxa10.phx.gbl>
<17****************************@phx.gbl> <T3**************@cpmsftngxa10.phx.gbl>
NNTP-Posting-Host: 207.218.120.108
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1095561292 20360 127.0.0.1 (19 Sep 2004 02:34:52 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Sun, 19 Sep 2004 02:34:52 +0000 (UTC)
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!border1.nn tp.dca.giganews.com!
nntp.giganews.com!news.glorb.com!postnews1.google. com!not-for-mail
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.webservices:6674
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Did you get solution to this problem ? I am seeing exactly the same
problem when I load my system with many HTTP requests.

da****@online.microsoft.com (Daniel Roth [MSFT]) wrote in message news:<T3**************@cpmsftngxa10.phx.gbl>...
You might be getting the "The underlying connection was closed. Unable to connect to the remote server" error because
too many connections are in the TIME_WAIT state. When this happens the system may run out of the random port range.
Clearing the KeepAlive flag might actually be aggravating this situation.

Please try entering "netstat -p TCP" at the command prompt and see how many TIME_WAIT connections are found.

Also, do you have code that we could use to reproduce these errors for further investigation?

Thank you for your patience.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl>
<BI**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 27 Aug 2004 12:41:42 -0700
Lines: 170
Message-ID: <17****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
thread-index: AcSMbeDGoXHBF+5uQYaTicjNqvUzdQ==
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6386
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are

mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an

ASP.NET client.

For the issues you are having, you should verify that

your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
are related. If you are still having these problems, I

might be able to help if you provide some more details.

Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----

=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I

will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to

connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy

configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #12
I'm getting the same problem on W2k3 Server/IIS 6.0 intermittently. I
cannot isolate the cause but have read with interest about Hotfix
#3028 .What does this apply to, the .Net 1.1 framework or W2k3? Where
can I read about it - I've searched the knowledge base cannot find it
anywhere.

We are using WSE2.0, will this fix the problem?

Any help much appreciated.
Paul.
Nov 21 '05 #13
Hi,
I join to us with the same problem but a different scenario.
The client is a VB.NET with .NET 1.1 SP1.
The server is a J2EE engine and the web services are developed in java with
JDK 1.3.1_8.

The client side is developed with VS 2003 tool and then the code is
automatically generated from the enviroment.
I tried to set the credential as follow

Dim credentials = New System.Net.NetworkCredential ("Admin", "itkpass",
"MYDOMAIN")
cds.Credentials = credentials
getWS.p0 = "1"
getResp = cds.purchaseOrderGet(getWS)

but without good news.

Seems to be an hard problem...
I've just opened a Microsoft issue. If I find a solution I post it on this
group.

Bye

"Rajeev Tipnis" wrote:

Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are

mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an

ASP.NET client.

For the issues you are having, you should verify that

your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
are related. If you are still having these problems, I

might be able to help if you provide some more details.

Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----

=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I

will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to

connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy

configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

Nov 21 '05 #14
I'd add that I'm not able to install the article 819450. I think because my
VS version is italian and the patch is for english version :-((

Bye

"Nick" wrote:
Hi,
I join to us with the same problem but a different scenario.
The client is a VB.NET with .NET 1.1 SP1.
The server is a J2EE engine and the web services are developed in java with
JDK 1.3.1_8.

The client side is developed with VS 2003 tool and then the code is
automatically generated from the enviroment.
I tried to set the credential as follow

Dim credentials = New System.Net.NetworkCredential ("Admin", "itkpass",
"MYDOMAIN")
cds.Credentials = credentials
getWS.p0 = "1"
getResp = cds.purchaseOrderGet(getWS)

but without good news.

Seems to be an hard problem...
I've just opened a Microsoft issue. If I find a solution I post it on this
group.

Bye

"Rajeev Tipnis" wrote:

Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev

-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are

mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an

ASP.NET client.

For the issues you are having, you should verify that

your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
are related. If you are still having these problems, I

might be able to help if you provide some more details.

Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----

=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I

will get back to you as soon as I have an answer.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG:

microsoft.public.dotnet.framework.webservices

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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to

connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy

configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

--

This posting is provided "AS IS" with no warranties, and

confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all

responses to this message are best directed to the
newsgroup/thread from which they originated.

Nov 21 '05 #15
Hi to all.
I resolved the problem appling the ArticleId 819450.
I attach the code and I hode that can be usefull for someother too.

Bye. Nicola
'
' IN CLIENT CLASS
'
Public Class Form1

Private Sub invoke_purchaseOrderGet()
Dim getCM As New itges000.purchaseOrderGet
Dim cds As New itges000.PurchaseOrderFunctionModuleService
Dim getResp As itges000.purchaseOrderGetResponse

' sets parameter
getCM.p0 = docEntry
' invokes web service
getResp = cds.purchaseOrderGet(getCM)

End Sub

End Class
'
' IN AUTOGENERATED CLASS
'
<System.Diagnostics.DebuggerStepThroughAttribute() , _
System.ComponentModel.DesignerCategoryAttribute("c ode"), _

System.Web.Services.WebServiceBindingAttribute(Nam e:="PurchaseOrderFunctionModuleSOAPHTTPBinding", _
[Namespace]:="urn:PurchaseOrderFunctionModuleInterface")> _
Public Class PurchaseOrderFunctionModuleService
Inherits System.Web.Services.Protocols.SoapHttpClientProtoc ol

<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("http://sap.com/SBOWebService/PurchaseOrderFunctionModule", _
Use:=System.Web.Services.Description.SoapBindingUs e.Literal, _
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Bare)> _
Public Function
purchaseOrderGet(<System.Xml.Serialization.XmlElem entAttribute("purchaseOrderGet",
[Namespace]:="urn:PurchaseOrderFunctionModuleInterface")> ByVal
purchaseOrderGet1 As purchaseOrderGet) As
<System.Xml.Serialization.XmlElementAttribute("pur chaseOrderGetResponse",
[Namespace]:="urn:PurchaseOrderFunctionModuleInterface")>
purchaseOrderGetResponse
Dim results() As Object

Dim siteUri As New Uri("http://itges000:80/SBOWebService/")
Dim wr As WebRequest = GetWebRequest(siteUri)

results = Me.Invoke("purchaseOrderGet", New Object() {purchaseOrderGet1})
Return CType(results(0), purchaseOrderGetResponse)
End Function

' Sets to false the HttpWebRequest KeepAlive properties as from MSDN
ArticleId 819450
Protected Overrides Function GetWebRequest(ByVal uri As Uri) As
System.Net.WebRequest
Dim wr As HttpWebRequest = CType(WebRequest.Create(uri), HttpWebRequest)
' set the credentials
Dim credentials = New System.Net.NetworkCredential("user", "password", "")
wr.Credentials = credentials

wr.KeepAlive = False

Return wr

End Function

...

End Class

"Nick" wrote:
I'd add that I'm not able to install the article 819450. I think because my
VS version is italian and the patch is for english version :-((

Bye

"Nick" wrote:
Hi,
I join to us with the same problem but a different scenario.
The client is a VB.NET with .NET 1.1 SP1.
The server is a J2EE engine and the web services are developed in java with
JDK 1.3.1_8.

The client side is developed with VS 2003 tool and then the code is
automatically generated from the enviroment.
I tried to set the credential as follow

Dim credentials = New System.Net.NetworkCredential ("Admin", "itkpass",
"MYDOMAIN")
cds.Credentials = credentials
getWS.p0 = "1"
getResp = cds.purchaseOrderGet(getWS)

but without good news.

Seems to be an hard problem...
I've just opened a Microsoft issue. If I find a solution I post it on this
group.

Bye

"Rajeev Tipnis" wrote:

Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev
>-----Original Message-----
>Hi Rajeev,
>
>I've answered your questions below:
>
>1) I believe this patch does apply to .Net 1.1.
>2) No, it does not solve the other cases since they are
mostly a result of user configuration problems.
>3) Yes, the fix does apply when the client is not an
ASP.NET client.
>
>For the issues you are having, you should verify that
your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
>are related. If you are still having these problems, I
might be able to help if you provide some more details.
>
>Let me know if you have further questions.
>
>Daniel Roth
>
>
>--------------------
>X-Tomcat-ID: 809948391
>References: <99****************************@phx.gbl>
>MIME-Version: 1.0
>Content-Type: multipart/alternative; boundary="----
=_NextPart_0001_6ADD76EC"
>Content-Transfer-Encoding: 7bit
>From: da****@online.microsoft.com (Daniel Roth [MSFT])
>Organization: Microsoft
>Date: Thu, 26 Aug 2004 23:37:23 GMT
>Subject: RE: Underlying connection was closed
>X-Tomcat-NG:
microsoft.public.dotnet.framework.webservices
>Message-ID: <np**************@cpmsftngxa10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.webservices
>Lines: 120
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:6375
>NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
>
>Hi Rajeev,
>
>I am in the process of investigating your questions. I
will get back to you as soon as I have an answer.
>
>Daniel Roth
>
>--------------------
>Content-Class: urn:content-classes:message
>From: "Rajeev Tipnis" <rt*****@convoq.com>
>Sender: "Rajeev Tipnis" <rt*****@convoq.com>
>Subject: Underlying connection was closed
>Date: Thu, 19 Aug 2004 14:59:51 -0700
>Lines: 23
>Message-ID: <99****************************@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.dotnet.framework.webservices
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:6290
>NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
>X-Tomcat-NG:
microsoft.public.dotnet.framework.webservices
>
>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
>occured on send.
>and not these (which is what we are seeing):
>
>- The underlying connection was closed. Unable to
connect
>to the remote server. OR
>- The underlying connection was closed. The proxy name
>could not be resolved, verify correct proxy
configuration.
>
>3) Would this not happen when the webservices client is
>not an ASP.NET client?
>
>Thanks
>Rajeev
>
>
>
>--
>
>This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
>http://www.microsoft.com/info/cpyright.htm
>
>Note: For the benefit of the community-at-large, all
responses to this message are best directed to the
newsgroup/thread from which they originated.
>
>
>
>--
>
>This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
>http://www.microsoft.com/info/cpyright.htm
>
>Note: For the benefit of the community-at-large, all
responses to this message are best directed to the
newsgroup/thread from which they originated.

Nov 21 '05 #16
Here’s my problem stack trace
The underlying connection was closed: The request was canceled. at
System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult
asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at MyWebService.WebMethod1()

I get this error intermittently.

The most popular fix posted for the problem is to set KeepAlive = false…
but that wasn’t working for me.

Infact as suggested by Daniel I did a netStat –p TCP and found that I
had plenty of connections in TIME_WAIT state with the KeepAlive set to
false. If I remove that, I get a lot fewer connections in TIME_WAIT state.

But I still intermittently see this issue. What does the stack trace
tell anyone?

I really don’t know what going on with this. Hopefully someone can help!

* Remove _spam_protect_ to contact

Daniel Roth [MSFT] wrote:
Hello,

Did you try checking on the number of connections in the TIME_WAIT state using the netstat command I mentioned earlier? Also could you please confirm for me that you
are seeing exaclty the same error message?

Thank you for your patience.

Daniel Roth

--------------------
From: me*******@gmail.com (AShah)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: Re: Underlying connection was closed
Date: 18 Sep 2004 19:34:52 -0700
Organization: http://groups.google.com
Lines: 211
Message-ID: <c0*************************@posting.google.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl> <BI**************@cpmsftngxa10.phx.gbl>
<17****************************@phx.gbl> <T3**************@cpmsftngxa10.phx.gbl>
NNTP-Posting-Host: 207.218.120.108
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1095561292 20360 127.0.0.1 (19 Sep 2004 02:34:52 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Sun, 19 Sep 2004 02:34:52 +0000 (UTC)
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!border1.nn tp.dca.giganews.com!
nntp.giganews.com!news.glorb.com!postnews1.google. com!not-for-mail
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.webservices:6674
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Did you get solution to this problem ? I am seeing exactly the same
problem when I load my system with many HTTP requests.

da****@online.microsoft.com (Daniel Roth [MSFT]) wrote in message news:<T3**************@cpmsftngxa10.phx.gbl>...
You might be getting the "The underlying connection was closed. Unable to connect to the remote server" error because
too many connections are in the TIME_WAIT state. When this happens the system may run out of the random port range.
Clearing the KeepAlive flag might actually be aggravating this situation.

Please try entering "netstat -p TCP" at the command prompt and see how many TIME_WAIT connections are found.

Also, do you have code that we could use to reproduce these errors for further investigation?

Thank you for your patience.

Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
References: <99****************************@phx.gbl> <np**************@cpmsftngxa10.phx.gbl>
<BI**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 27 Aug 2004 12:41:42 -0700
Lines: 170
Message-ID: <17****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
thread-index: AcSMbeDGoXHBF+5uQYaTicjNqvUzdQ==
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:6386
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Hi Daniel -
Thanks for looking into this.

When you say, this patch applied to 1.1, do you mean we
still need to get this patch (if we already have 1.1)?
In any case, we are in the process of getting this patch.

However, what I dont understand is - how can the
configuration be incorrect as this happens
only "intermittently".

So, in my load test case, I have a load test application
that runs against a web service. When the number of
simultaneous connections go over 20-25 range to the web
service, we begin to see these errors.

In my case the scenario is as follows:
Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)
2. Web Services Server:
A .Net web service hosted on IIS 6.0 (on Win2K3)
on .NET 1.1 Framework.

I start to see these errors when the load goes
beyond a certain threshold (about 25 connections, I
believe are open at that point).

What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really long timeouts

If the configuration was incorrect, I would expect that
this would fail each time, but it fails with these errors
only under load.

Thanks in advance.

Rajeev
-----Original Message-----
Hi Rajeev,

I've answered your questions below:

1) I believe this patch does apply to .Net 1.1.
2) No, it does not solve the other cases since they are


mostly a result of user configuration problems.
3) Yes, the fix does apply when the client is not an


ASP.NET client.
For the issues you are having, you should verify that


your proxy settings are correct and that you are
correctly specifying a valid server. Quite possibly
these two issues
are related. If you are still having these problems, I


might be able to help if you provide some more details.
Let me know if you have further questions.

Daniel Roth
--------------------
X-Tomcat-ID: 809948391
References: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----


=_NextPart_0001_6ADD76EC"
Content-Transfer-Encoding: 7bit
From: da****@online.microsoft.com (Daniel Roth [MSFT])
Organization: Microsoft
Date: Thu, 26 Aug 2004 23:37:23 GMT
Subject: RE: Underlying connection was closed
X-Tomcat-NG:


microsoft.public.dotnet.framework.webservices
Message-ID: <np**************@cpmsftngxa10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
Lines: 120
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl


microsoft.public.dotnet.framework.webservices:6375
NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122

Hi Rajeev,

I am in the process of investigating your questions. I


will get back to you as soon as I have an answer.
Daniel Roth

--------------------
Content-Class: urn:content-classes:message
From: "Rajeev Tipnis" <rt*****@convoq.com>
Sender: "Rajeev Tipnis" <rt*****@convoq.com>
Subject: Underlying connection was closed
Date: Thu, 19 Aug 2004 14:59:51 -0700
Lines: 23
Message-ID: <99****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSGN9pVbhl3R/z4Q7iWwoav0NPNXg==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.framework.webservices
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl


microsoft.public.dotnet.framework.webservices:6290
NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
X-Tomcat-NG:


microsoft.public.dotnet.framework.webservices
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to


connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy


configuration.
3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

--

This posting is provided "AS IS" with no warranties, and


confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all


responses to this message are best directed to the
newsgroup/thread from which they originated.


--

This posting is provided "AS IS" with no warranties, and


confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all


responses to this message are best directed to the
newsgroup/thread from which they originated.


Nov 21 '05 #17
I have a similar issue. My webservice will work on browser but my windows app
cannot access it.

My original error message used to be the underlying connection was closed.
I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to
find a fix for this.

"Rajeev Tipnis" wrote:
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev

Nov 21 '05 #18
Hello,

A couple of questions that might help me understand your issue:

Could you please post the complete exception text and stack trace? It would be helpful to know exactly what error you are seeing. Also, if there any inner exceptions, that
information would be useful as well.

If possible, could you please post the code you are using to access the webservice? Also, please confirm that you are able to access the web service through the
browser, but not using your application code.

Is SP1 for the .Net Framework 1.1 installed?

Is there any other load on the server, or is the server just receiving the single web service call?

Thank you for your patience.

Daniel Roth
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
X-WBNR-Posting-Host: 163.188.94.164
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 12 Nov 2004 12:40:02 -0800
Lines: 37
Message-ID: <8F**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7407
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have a similar issue. My webservice will work on browser but my windows app
cannot access it.

My original error message used to be the underlying connection was closed.
I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to
find a fix for this.

"Rajeev Tipnis" wrote:
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #19
Daniel,
Find following my complete exception and stack trace.
Find also the code that I use to access the service
Yes, I am confirming that I am able to access the web service through the
browser, but not using your application code.
I do have .NET framework 1.1 sp1 and .NET framework 1.0 - the version of my
aspnet_isapi.dll is 1.1.4322.2032
There is no other load - the webservice is on my local machine and no-one
else is accessing it.

CODE THAT ACCESSES THE SERVICE
private void cmdBegin_Click(object sender, System.EventArgs e)
{
try
{

localhost.Service1 x = new localhost.Service1();
// x.Timeout = 90000;
// x.Timeout = -1;
x.HelloWorld();
System.Diagnostics.Debug.WriteLine(x.HelloWorld()) ;
}
catch(Exception exct)
{
System.Diagnostics.Debug.WriteLine(exct.Message.To String());
// System.Diagnostics.Debug.WriteLine(exct.Source.ToS tring());
System.Diagnostics.Debug.WriteLine("INNER EXCEPTION" +
exct.InnerException.StackTrace.ToString());
System.Diagnostics.Debug.WriteLine(exct.StackTrace .ToString());
}
}
I also have the entire app itself but I am not sure how to upload it and
where you can download it from. I have written a simple HelloWorld Webservice
and a simple WindowsApplication1 that calls the HelloWorld webservice.

ERROR STACK TRACE

'WindowsApplication1.exe': Loaded 'lu6vo1n4', No symbols loaded.
The underlying connection was closed: An unexpected error occurred on a
receive.
An unhandled exception of type 'System.NullReferenceException' occurred in
WindowsApplication1.exe

Additional information: Object reference not set to an instance of an object.
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object.
at WindowsApplication1.Form1.cmdBegin_Click(Object sender, EventArgs e)
in d:\windowsapplication1\form1.cs:line 105
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMethods+IMsoComponentManager. FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Form1.Main() in
d:\windowsapplication1\form1.cs:line 84The program '[2816]
WindowsApplication1.exe' has exited with code 0 (0x0).
"Daniel Roth [MSFT]" wrote:
Hello,

A couple of questions that might help me understand your issue:

Could you please post the complete exception text and stack trace? It would be helpful to know exactly what error you are seeing. Also, if there any inner exceptions, that
information would be useful as well.

If possible, could you please post the code you are using to access the webservice? Also, please confirm that you are able to access the web service through the
browser, but not using your application code.

Is SP1 for the .Net Framework 1.1 installed?

Is there any other load on the server, or is the server just receiving the single web service call?

Thank you for your patience.

Daniel Roth
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
X-WBNR-Posting-Host: 163.188.94.164
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 12 Nov 2004 12:40:02 -0800
Lines: 37
Message-ID: <8F**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7407
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have a similar issue. My webservice will work on browser but my windows app
cannot access it.

My original error message used to be the underlying connection was closed.
I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to
find a fix for this.

"Rajeev Tipnis" wrote:
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated

Nov 21 '05 #20
Daniel,

I seem to be having the same problem here.
I've written a client application which fires off multiple threads
each which make many requests to our web-service to mimic a server
under extreme load (between 40 and 60 request per second, many
thousands of total requests in a short time period).

Running "netstat -p TCP" shows almost 4000 connections in a TIME_WAIT
state.

Based on your responses within this thread, it looks like the requests
are actually being queued on the client and time-out before a message
actually gets sent over the wire.

So can you clarify that this is a problem on the client, not the
server (and that hotfix #3028 resolves the problem from the
perspective of the client initiating requests, not the server
responding to them)?

If this is the case, then I simply need to re-think my testing
approach. In production, none of our clients will generate anywhere
near as much traffic, so this shouldn't be a production worry.

Regards,

Dennis Martin.
Nov 21 '05 #21
It looks like a null reference exception is being thrown, which is causing the connection to be closed. Have you been able to track down the cause of the null reference
exception? You didn't include the line numbers, but the exception appears to happen on line 105.

Daniel Roth

--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTMGn0bRA9JAfD7SBaEE307DUkRFg==
X-WBNR-Posting-Host: 163.188.94.134
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl> <8F**********************************@microsoft.co m> <Eb0VI6$yEHA.3388
@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Tue, 16 Nov 2004 12:26:01 -0800
Lines: 168
Message-ID: <50**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7485
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Daniel,
Find following my complete exception and stack trace.
Find also the code that I use to access the service
Yes, I am confirming that I am able to access the web service through the
browser, but not using your application code.
I do have .NET framework 1.1 sp1 and .NET framework 1.0 - the version of my
aspnet_isapi.dll is 1.1.4322.2032
There is no other load - the webservice is on my local machine and no-one
else is accessing it.

CODE THAT ACCESSES THE SERVICE
private void cmdBegin_Click(object sender, System.EventArgs e)
{
try
{

localhost.Service1 x = new localhost.Service1();
// x.Timeout = 90000;
// x.Timeout = -1;
x.HelloWorld();
System.Diagnostics.Debug.WriteLine(x.HelloWorld()) ;
}
catch(Exception exct)
{
System.Diagnostics.Debug.WriteLine(exct.Message.To String());
// System.Diagnostics.Debug.WriteLine(exct.Source.ToS tring());
System.Diagnostics.Debug.WriteLine("INNER EXCEPTION" +
exct.InnerException.StackTrace.ToString());
System.Diagnostics.Debug.WriteLine(exct.StackTrace .ToString());
}
}
I also have the entire app itself but I am not sure how to upload it and
where you can download it from. I have written a simple HelloWorld Webservice
and a simple WindowsApplication1 that calls the HelloWorld webservice.

ERROR STACK TRACE

'WindowsApplication1.exe': Loaded 'lu6vo1n4', No symbols loaded.
The underlying connection was closed: An unexpected error occurred on a
receive.
An unhandled exception of type 'System.NullReferenceException' occurred in
WindowsApplication1.exe

Additional information: Object reference not set to an instance of an object.
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object.
at WindowsApplication1.Form1.cmdBegin_Click(Object sender, EventArgs e)
in d:\windowsapplication1\form1.cs:line 105
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMethods+IMsoComponentManager. FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Form1.Main() in
d:\windowsapplication1\form1.cs:line 84The program '[2816]
WindowsApplication1.exe' has exited with code 0 (0x0).
"Daniel Roth [MSFT]" wrote:
Hello,

A couple of questions that might help me understand your issue:

Could you please post the complete exception text and stack trace? It would be helpful to know exactly what error you are seeing. Also, if there any inner exceptions, that information would be useful as well.

If possible, could you please post the code you are using to access the webservice? Also, please confirm that you are able to access the web service through the browser, but not using your application code.

Is SP1 for the .Net Framework 1.1 installed?

Is there any other load on the server, or is the server just receiving the single web service call?

Thank you for your patience.

Daniel Roth
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
X-WBNR-Posting-Host: 163.188.94.164
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 12 Nov 2004 12:40:02 -0800
Lines: 37
Message-ID: <8F**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7407
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have a similar issue. My webservice will work on browser but my windows app
cannot access it.

My original error message used to be the underlying connection was closed.
I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to
find a fix for this.

"Rajeev Tipnis" wrote:
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #22
Are you setting KeepAlive to false? Doing so will cause the number of connections in the TIME_WAIT state to increase. We recommend leaving KeepAlive set to true
whenever possible.

Also, are these requests authenticated? If so, you can try setting both PreAuthenticate and UnsafeAuthenticateConnectionSharing to true. You need to be careful, though,
when setting UnsafeAuthenticateConnectionSharing to true because authenticated connections could be shared between different users. I've copied the warning text for
this property from the documentation below:

"Caution: Because it is possible for an application to use the connection without being authenticated, you need to be sure that there is no security vulnerability in your
system when setting this property to true. If your application sends requests for multiple users (impersonates multiple user accounts) and relies on authentication to protect
resources, do not set this property to true unless you use connection groups as described below. "

Hotfix 3028 is probably not related to your issue.

Daniel Roth

--------------------
From: de***********@hotmail.com (Dennis Martin)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: Re: Underlying connection was closed
Date: 29 Nov 2004 08:53:29 -0800
Organization: http://groups.google.com
Lines: 27
Message-ID: <f4**************************@posting.google.com >
References: <99****************************@phx.gbl> <8F**********************************@microsoft.co m> <Eb0VI6$yEHA.3388
@cpmsftngxa10.phx.gbl> <50**********************************@microsoft.co m>
NNTP-Posting-Host: 209.182.108.158
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101747209 25507 127.0.0.1 (29 Nov 2004 16:53:29 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Mon, 29 Nov 2004 16:53:29 +0000 (UTC)
Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!
border1.nntp.dca.giganews.com!nntp.giganews.com!ne ws.glorb.com!postnews.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7679
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Daniel,

I seem to be having the same problem here.
I've written a client application which fires off multiple threads
each which make many requests to our web-service to mimic a server
under extreme load (between 40 and 60 request per second, many
thousands of total requests in a short time period).

Running "netstat -p TCP" shows almost 4000 connections in a TIME_WAIT
state.

Based on your responses within this thread, it looks like the requests
are actually being queued on the client and time-out before a message
actually gets sent over the wire.

So can you clarify that this is a problem on the client, not the
server (and that hotfix #3028 resolves the problem from the
perspective of the client initiating requests, not the server
responding to them)?

If this is the case, then I simply need to re-think my testing
approach. In production, none of our clients will generate anywhere
near as much traffic, so this shouldn't be a production worry.

Regards,

Dennis Martin.

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Nov 21 '05 #23
I was not able to track those exceptions. We tried changing the
machine.config and it made it even worse. So, right now, I uninstalled IIS,
reinstalled it and I am going to uninstall Visual Studio and try reinstalling
it.
--Subha

"Daniel Roth [MSFT]" wrote:
It looks like a null reference exception is being thrown, which is causing the connection to be closed. Have you been able to track down the cause of the null reference
exception? You didn't include the line numbers, but the exception appears to happen on line 105.

Daniel Roth

--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTMGn0bRA9JAfD7SBaEE307DUkRFg==
X-WBNR-Posting-Host: 163.188.94.134
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl> <8F**********************************@microsoft.co m> <Eb0VI6$yEHA.3388
@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Tue, 16 Nov 2004 12:26:01 -0800
Lines: 168
Message-ID: <50**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7485
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Daniel,
Find following my complete exception and stack trace.
Find also the code that I use to access the service
Yes, I am confirming that I am able to access the web service through the
browser, but not using your application code.
I do have .NET framework 1.1 sp1 and .NET framework 1.0 - the version of my
aspnet_isapi.dll is 1.1.4322.2032
There is no other load - the webservice is on my local machine and no-one
else is accessing it.

CODE THAT ACCESSES THE SERVICE
private void cmdBegin_Click(object sender, System.EventArgs e)
{
try
{

localhost.Service1 x = new localhost.Service1();
// x.Timeout = 90000;
// x.Timeout = -1;
x.HelloWorld();
System.Diagnostics.Debug.WriteLine(x.HelloWorld()) ;
}
catch(Exception exct)
{
System.Diagnostics.Debug.WriteLine(exct.Message.To String());
// System.Diagnostics.Debug.WriteLine(exct.Source.ToS tring());
System.Diagnostics.Debug.WriteLine("INNER EXCEPTION" +
exct.InnerException.StackTrace.ToString());
System.Diagnostics.Debug.WriteLine(exct.StackTrace .ToString());
}
}
I also have the entire app itself but I am not sure how to upload it and
where you can download it from. I have written a simple HelloWorld Webservice
and a simple WindowsApplication1 that calls the HelloWorld webservice.

ERROR STACK TRACE

'WindowsApplication1.exe': Loaded 'lu6vo1n4', No symbols loaded.
The underlying connection was closed: An unexpected error occurred on a
receive.
An unhandled exception of type 'System.NullReferenceException' occurred in
WindowsApplication1.exe

Additional information: Object reference not set to an instance of an object.
Unhandled Exception: System.NullReferenceException: Object reference not set
to an instance of an object.
at WindowsApplication1.Form1.cmdBegin_Click(Object sender, EventArgs e)
in d:\windowsapplication1\form1.cs:line 105
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMethods+IMsoComponentManager. FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Form1.Main() in
d:\windowsapplication1\form1.cs:line 84The program '[2816]
WindowsApplication1.exe' has exited with code 0 (0x0).
"Daniel Roth [MSFT]" wrote:
Hello,

A couple of questions that might help me understand your issue:

Could you please post the complete exception text and stack trace? It would be helpful to know exactly what error you are seeing. Also, if there any inner

exceptions, that
information would be useful as well.

If possible, could you please post the code you are using to access the webservice? Also, please confirm that you are able to access the web service through

the
browser, but not using your application code.

Is SP1 for the .Net Framework 1.1 installed?

Is there any other load on the server, or is the server just receiving the single web service call?

Thank you for your patience.

Daniel Roth
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
X-WBNR-Posting-Host: 163.188.94.164
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 12 Nov 2004 12:40:02 -0800
Lines: 37
Message-ID: <8F**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7407
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have a similar issue. My webservice will work on browser but my windows app
cannot access it.

My original error message used to be the underlying connection was closed.
I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to
find a fix for this.

"Rajeev Tipnis" wrote:
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated

Nov 21 '05 #24
I did put a break point. The null reference exception was because there was
no inner-exception. So, I commented out the line that printed innerexception
and tried to get a stack trace of the main error.

If I do not put a try-catch block The error I get is "Underlying connection
was closed: Unexpected error occured on receive".

If I put a try catch block and ask it to print a stack trace I get "The
operation has timed-out.
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResponse(WebRequest
request)"

The error message alternates between operation timing out and unexpected
error occured on receive.

I am at a loss here. Don't know what to do.

I have a case created with MSFT and someone (not sure if I can mentione name
here) did a live meeting for 2 hours and is looking into this issue but we
don't seem to have much clues. He created hang dumps and I have hang dumps,
but that is how far we have gotten.

"Dan Rogers" wrote:
Hi,

Jumping in with .02cents... reinstalling IIS/ASP.net is unlikely to catch
the cause of a null reference exception in your code. Suggest you put a
debugger on the method being called and figure out what line of code is
throwing the exception. This is the line that will be using the object
reference that is not initialized.

Hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTX8c8Jon1HI/LpSMCd2FvCjqKp8Q==
X-WBNR-Posting-Host: 163.188.94.112
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
<8F**********************************@microsoft.co m>
<Eb**************@cpmsftngxa10.phx.gbl>
<50**********************************@microsoft.co m>
<qW**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Wed, 1 Dec 2004 14:05:03 -0800
Lines: 218
Message-ID: <9C**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7729
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I was not able to track those exceptions. We tried changing the
machine.config and it made it even worse. So, right now, I uninstalled
IIS,
reinstalled it and I am going to uninstall Visual Studio and try
reinstalling
it.
--Subha

"Daniel Roth [MSFT]" wrote:
It looks like a null reference exception is being thrown, which is

causing the connection to be closed. Have you been able to track down the
cause of the null reference
exception? You didn't include the line numbers, but the exception

appears to happen on line 105.

Daniel Roth

--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTMGn0bRA9JAfD7SBaEE307DUkRFg==
X-WBNR-Posting-Host: 163.188.94.134
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>

<8F**********************************@microsoft.co m> <Eb0VI6$yEHA.3388
@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Tue, 16 Nov 2004 12:26:01 -0800
Lines: 168
Message-ID: <50**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:7485
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Daniel,
Find following my complete exception and stack trace.
Find also the code that I use to access the service
Yes, I am confirming that I am able to access the web service through the
browser, but not using your application code.
I do have .NET framework 1.1 sp1 and .NET framework 1.0 - the version of

my
aspnet_isapi.dll is 1.1.4322.2032
There is no other load - the webservice is on my local machine and no-one
else is accessing it.

CODE THAT ACCESSES THE SERVICE
private void cmdBegin_Click(object sender, System.EventArgs e)
{
try
{

localhost.Service1 x = new localhost.Service1();
// x.Timeout = 90000;
// x.Timeout = -1;
x.HelloWorld();
System.Diagnostics.Debug.WriteLine(x.HelloWorld()) ;
}
catch(Exception exct)
{
System.Diagnostics.Debug.WriteLine(exct.Message.To String());
// System.Diagnostics.Debug.WriteLine(exct.Source.ToS tring());
System.Diagnostics.Debug.WriteLine("INNER EXCEPTION" +
exct.InnerException.StackTrace.ToString());
System.Diagnostics.Debug.WriteLine(exct.StackTrace .ToString());
}
}
I also have the entire app itself but I am not sure how to upload it and
where you can download it from. I have written a simple HelloWorld

Webservice
and a simple WindowsApplication1 that calls the HelloWorld webservice.

ERROR STACK TRACE

'WindowsApplication1.exe': Loaded 'lu6vo1n4', No symbols loaded.
The underlying connection was closed: An unexpected error occurred on a
receive.
An unhandled exception of type 'System.NullReferenceException' occurred

in
WindowsApplication1.exe

Additional information: Object reference not set to an instance of an

object.


Unhandled Exception: System.NullReferenceException: Object reference not

set
to an instance of an object.
at WindowsApplication1.Form1.cmdBegin_Click(Object sender, EventArgs

e)
in d:\windowsapplication1\form1.cs:line 105
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at

System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32

reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Form1.Main() in
d:\windowsapplication1\form1.cs:line 84The program '[2816]
WindowsApplication1.exe' has exited with code 0 (0x0).
"Daniel Roth [MSFT]" wrote:
Hello,

A couple of questions that might help me understand your issue:

Could you please post the complete exception text and stack trace? It would be helpful to know exactly what error you are seeing. Also, if there
any inner
exceptions, that
information would be useful as well.

If possible, could you please post the code you are using to access the

webservice? Also, please confirm that you are able to access the web
service through
the
browser, but not using your application code.

Is SP1 for the .Net Framework 1.1 installed?

Is there any other load on the server, or is the server just receiving

the single web service call?
Thank you for your patience.

Daniel Roth
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
X-WBNR-Posting-Host: 163.188.94.164
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 12 Nov 2004 12:40:02 -0800
Lines: 37
Message-ID: <8F**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29 Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7407 X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have a similar issue. My webservice will work on browser but my windows app cannot access it.

My original error message used to be the underlying connection was closed. I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to find a fix for this.

"Rajeev Tipnis" wrote:

> 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
> occured on send.
> and not these (which is what we are seeing):
>
> - The underlying connection was closed. Unable to connect
> to the remote server. OR
> - The underlying connection was closed. The proxy name
> could not be resolved, verify correct proxy configuration.
>
> 3) Would this not happen when the webservices client is
> not an ASP.NET client?
>
> Thanks
> Rajeev
>

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this

message are best directed to the newsgroup/thread from which they originated

--

This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified
at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this

message are best directed to the newsgroup/thread from which they originated

Nov 21 '05 #25
Dan,

Thanks for the mail. An actual person from Microsoft Tech support found that
one of my installed applications was interfering with IIS for some reason.
When I uninstalled that application and restarted, my windows application
started reaching the webservice url.

He found this by generating hang dumps and analyzing the hang dumps. I
wonder how others having similar problems would have found this.

Regards
Subha

"subha" wrote:
I did put a break point. The null reference exception was because there was
no inner-exception. So, I commented out the line that printed innerexception
and tried to get a stack trace of the main error.

If I do not put a try-catch block The error I get is "Underlying connection
was closed: Unexpected error occured on receive".

If I put a try catch block and ask it to print a stack trace I get "The
operation has timed-out.
at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResponse(WebRequest
request)"

The error message alternates between operation timing out and unexpected
error occured on receive.

I am at a loss here. Don't know what to do.

I have a case created with MSFT and someone (not sure if I can mentione name
here) did a live meeting for 2 hours and is looking into this issue but we
don't seem to have much clues. He created hang dumps and I have hang dumps,
but that is how far we have gotten.

"Dan Rogers" wrote:
Hi,

Jumping in with .02cents... reinstalling IIS/ASP.net is unlikely to catch
the cause of a null reference exception in your code. Suggest you put a
debugger on the method being called and figure out what line of code is
throwing the exception. This is the line that will be using the object
reference that is not initialized.

Hope this helps

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTX8c8Jon1HI/LpSMCd2FvCjqKp8Q==
X-WBNR-Posting-Host: 163.188.94.112
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
<8F**********************************@microsoft.co m>
<Eb**************@cpmsftngxa10.phx.gbl>
<50**********************************@microsoft.co m>
<qW**************@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Wed, 1 Dec 2004 14:05:03 -0800
Lines: 218
Message-ID: <9C**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7729
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I was not able to track those exceptions. We tried changing the
machine.config and it made it even worse. So, right now, I uninstalled
IIS,
reinstalled it and I am going to uninstall Visual Studio and try
reinstalling
it.
--Subha

"Daniel Roth [MSFT]" wrote:
It looks like a null reference exception is being thrown, which is

causing the connection to be closed. Have you been able to track down the
cause of the null reference
exception? You didn't include the line numbers, but the exception

appears to happen on line 105.

Daniel Roth

--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTMGn0bRA9JAfD7SBaEE307DUkRFg==
X-WBNR-Posting-Host: 163.188.94.134
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>

<8F**********************************@microsoft.co m> <Eb0VI6$yEHA.3388
@cpmsftngxa10.phx.gbl>
Subject: RE: Underlying connection was closed
Date: Tue, 16 Nov 2004 12:26:01 -0800
Lines: 168
Message-ID: <50**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:7485
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Daniel,
Find following my complete exception and stack trace.
Find also the code that I use to access the service
Yes, I am confirming that I am able to access the web service through the
browser, but not using your application code.
I do have .NET framework 1.1 sp1 and .NET framework 1.0 - the version of

my
aspnet_isapi.dll is 1.1.4322.2032
There is no other load - the webservice is on my local machine and no-one
else is accessing it.

CODE THAT ACCESSES THE SERVICE
private void cmdBegin_Click(object sender, System.EventArgs e)
{
try
{

localhost.Service1 x = new localhost.Service1();
// x.Timeout = 90000;
// x.Timeout = -1;
x.HelloWorld();
System.Diagnostics.Debug.WriteLine(x.HelloWorld()) ;
}
catch(Exception exct)
{
System.Diagnostics.Debug.WriteLine(exct.Message.To String());
// System.Diagnostics.Debug.WriteLine(exct.Source.ToS tring());
System.Diagnostics.Debug.WriteLine("INNER EXCEPTION" +
exct.InnerException.StackTrace.ToString());
System.Diagnostics.Debug.WriteLine(exct.StackTrace .ToString());
}
}
I also have the entire app itself but I am not sure how to upload it and
where you can download it from. I have written a simple HelloWorld

Webservice
and a simple WindowsApplication1 that calls the HelloWorld webservice.

ERROR STACK TRACE

'WindowsApplication1.exe': Loaded 'lu6vo1n4', No symbols loaded.
The underlying connection was closed: An unexpected error occurred on a
receive.
An unhandled exception of type 'System.NullReferenceException' occurred

in
WindowsApplication1.exe

Additional information: Object reference not set to an instance of an

object.


Unhandled Exception: System.NullReferenceException: Object reference not

set
to an instance of an object.
at WindowsApplication1.Form1.cmdBegin_Click(Object sender, EventArgs

e)
in d:\windowsapplication1\form1.cs:line 105
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at

System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeMetho
ds+IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32

reason,
ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Form1.Main() in
d:\windowsapplication1\form1.cs:line 84The program '[2816]
WindowsApplication1.exe' has exited with code 0 (0x0).
"Daniel Roth [MSFT]" wrote:

> Hello,
>
> A couple of questions that might help me understand your issue:
>
> Could you please post the complete exception text and stack trace? It

would be helpful to know exactly what error you are seeing. Also, if there
any inner
exceptions, that
> information would be useful as well.
>
> If possible, could you please post the code you are using to access the

webservice? Also, please confirm that you are able to access the web
service through
the
> browser, but not using your application code.
>
> Is SP1 for the .Net Framework 1.1 installed?
>
> Is there any other load on the server, or is the server just receiving

the single web service call?
>
> Thank you for your patience.
>
> Daniel Roth
>
>
> --------------------
> Thread-Topic: Underlying connection was closed
> thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
> X-WBNR-Posting-Host: 163.188.94.164
> From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
> References: <99****************************@phx.gbl>
> Subject: RE: Underlying connection was closed
> Date: Fri, 12 Nov 2004 12:40:02 -0800
> Lines: 37
> Message-ID: <8F**********************************@microsoft.co m>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.dotnet.framework.webservices
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29

> Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.webservices:7407
> X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
>
> I have a similar issue. My webservice will work on browser but my

windows app
> cannot access it.
>
> My original error message used to be the underlying connection was

closed.
> I am using .NET framework 1.1 and IIS 5.0 on W2K.
>
> Now, I get an operation timed-out error.
>
> I have tried pretty much everything from all news-groups and am

desperate to
> find a fix for this.
>
> "Rajeev Tipnis" wrote:
>
> > 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
> > occured on send.
> > and not these (which is what we are seeing):
> >
> > - The underlying connection was closed. Unable to connect
> > to the remote server. OR
> > - The underlying connection was closed. The proxy name
> > could not be resolved, verify correct proxy configuration.
> >
> > 3) Would this not happen when the webservices client is
> > not an ASP.NET client?
> >
> > Thanks
> > Rajeev
> >
>
>
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified
at
> http://www.microsoft.com/info/cpyright.htm
>
> Note: For the benefit of the community-at-large, all responses to this

message are best directed to the newsgroup/thread from which they originated

--

This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified
at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this

message are best directed to the newsgroup/thread from which they originated

Nov 23 '05 #26
I'm also having trouble with intermittent failures on calls to one of my web
services.

It happens in bunches of 5-10 around 5 or 6 times a day on one client and
very intermittently at others (once a month)
As a test I installed a windows service that connected to the same folder on
the web server and downloaded a file once a minute. It never had any trouble

Web server: Windows 2003
IIS on the Web server: 6
Dev env: VS .Net 2003 v7.1.3088
We are using advanced digest authentication.
VB.net for the ws and the client.

I have checked/unchecked http keep-alives on the web server
I have upped the timeout in IIS on the web server to something ridiculous

System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive. at
System.Web.Services.Protocols.WebClientProtocol.Ge tWebResponse(WebRequest
request) at
System.Web.Services.Protocols.HttpWebClientProtoco l.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters) at
QIS_RapidService.com.quors.rapid.Utilities.LogRapi dSessionInfo(String
strMachineName, String strDealer, Int32 iNumberOfFilesReadyToSend, Int32
iNumberOfFilesSent, Int32 iNumberOfFilesReceived, DateTime dtSessionStarted,
DateTime dtSessionEnded, Int32 iSessionTimedOut, String& strErrorToReturn) in
H:\QIS_RAPID\QIS_RapidService\Web
References\com.quors.rapid\Reference.vb:line 47 at
QIS_RapidService.QISRapidService.LogSessionInfo(Da teTime dtSessionStarted,
DateTime dtSessionEnded, Boolean blnSessionTimedOut, String strDealer) in
H:\QIS_RAPID\QIS_RapidService\QISRapidService.vb:l ine 399

"Daniel Roth [MSFT]" wrote:
Hello,

A couple of questions that might help me understand your issue:

Could you please post the complete exception text and stack trace? It would be helpful to know exactly what error you are seeing. Also, if there any inner exceptions, that
information would be useful as well.

If possible, could you please post the code you are using to access the webservice? Also, please confirm that you are able to access the web service through the
browser, but not using your application code.

Is SP1 for the .Net Framework 1.1 installed?

Is there any other load on the server, or is the server just receiving the single web service call?

Thank you for your patience.

Daniel Roth
--------------------
Thread-Topic: Underlying connection was closed
thread-index: AcTI98jEurcOKG+ITEmrlPwWvBgISA==
X-WBNR-Posting-Host: 163.188.94.164
From: "=?Utf-8?B?c3ViaGE=?=" <su***@discussions.microsoft.com>
References: <99****************************@phx.gbl>
Subject: RE: Underlying connection was closed
Date: Fri, 12 Nov 2004 12:40:02 -0800
Lines: 37
Message-ID: <8F**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.webservices:7407
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have a similar issue. My webservice will work on browser but my windows app
cannot access it.

My original error message used to be the underlying connection was closed.
I am using .NET framework 1.1 and IIS 5.0 on W2K.

Now, I get an operation timed-out error.

I have tried pretty much everything from all news-groups and am desperate to
find a fix for this.

"Rajeev Tipnis" wrote:
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
occured on send.
and not these (which is what we are seeing):

- The underlying connection was closed. Unable to connect
to the remote server. OR
- The underlying connection was closed. The proxy name
could not be resolved, verify correct proxy configuration.

3) Would this not happen when the webservices client is
not an ASP.NET client?

Thanks
Rajeev


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated

Nov 23 '05 #27

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

Similar topics

3
by: MattM | last post by:
I am getting the "The underlying connection was closed: Unable to connect to the remote server" message when trying to connect an ASPX page to a simple Hello World web service. I have read a few...
5
by: Vijayakrishna Pondala | last post by:
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...
4
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's...
2
by: hazz | last post by:
Dim ws As New GetInfoByZIP.USZip works great if I have an internet connection on my dev machine. As soon as I lose or disable my internet connection I get "The underlying connection was...
1
by: Tim Reynolds | last post by:
Team, From a windows service, we consume a web service on another server and occasionally receive System.Net.WebException: The underlying connection was closed:. For some clients we call, we do...
3
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...
2
by: =?Utf-8?B?RnJpZWRoZWxtRWljaGlu?= | last post by:
I am consuming continously my own web-services on a localhost client with a rate of perhaps 35 request/response-pairs a minute. I am using "invoke-id=1", so there is at the same time only one...
4
by: =?Utf-8?B?QXJuYXVkIFZpc2N1c2k=?= | last post by:
Hi all, we meet a problem since we use WCF to consume java WebServices. Often the first call works then the second raises the following error : "The underlying connection was closed : " We...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.