DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 16 Aug 2007 18:01:27 GMT,    posted on: microsoft.public.dotnet.framework.aspnet.webservices        back       

Thread Index
  1    Gaetan
          2    Michael D. Ober obermd.@.alum.mit.edu.nospam
                 3    Gaetan
                        4    Adrian H


TCP/IP port exhaustion - Unable to connect to the remote server   
I have a web service client application that works fine when the requests rate is moderate. But when
I crank up the request rate, I eventually receive an "Unable to connect to the remote server"
exception.

Running the "netstat -n" command at that point, I determined that all the TCP/IP ports in the range
of 1025-5000 were in a TIME-WAIT state. Although this article refers to BizTalk
(http://msdn2.microsoft.com/en-us/library/aa560610.aspx) I experience the exact same results.

Is there a way to have the client side of a WebService request to re-use the same TCP/IP connection
for every request sent to a given remote host?
Date:Thu, 16 Aug 2007 18:01:27 GMT   Author:  

Re: TCP/IP port exhaustion - Unable to connect to the remote server   
What you are experiencing is a Denial of Service situation.  The MSDN 
article you referenced tells you exactly what needs to be done to alleviate 
this issue.  IP ports are numbered from 1 to 65534 and port numbers below 
1000 are usually reserved for server applications for the initial 
connection.  Windows, by default, only uses ports 1000 to 5000 to satisfy 
connection requests.  This leaves 60534 ports "available" but never used by 
Windows for this purpose.

Assuming your client isn't initiating and then ignoring the response from 
the server, thus generating what's known as a SYN attack, and also properly 
closing the socket when done (Article Fix Option 1), you need to increase 
the number of ports on the server (Article Fix Option 2).  I would also 
consider reducing the socket timeout as described in Article Fix Option 3 
if, and only if, you increase the ports to the maximum and are still having 
this error.

For more information on this, please post in a Windows Server NG as this 
issue is not really a .NET issue.

Mike Ober.

"Gaetan"  wrote in message 
news:km19c3t9l4i5bsddggm9qiqmsl920flnbq@4ax.com...

>I have a web service client application that works fine when the requests 
>rate is moderate. But when
> I crank up the request rate, I eventually receive an "Unable to connect to 
> the remote server"
> exception.
>
> Running the "netstat -n" command at that point, I determined that all the 
> TCP/IP ports in the range
> of 1025-5000 were in a TIME-WAIT state. Although this article refers to 
> BizTalk
> (http://msdn2.microsoft.com/en-us/library/aa560610.aspx) I experience the 
> exact same results.
>
> Is there a way to have the client side of a WebService request to re-use 
> the same TCP/IP connection
> for every request sent to a given remote host?
> 
Date:Fri, 17 Aug 2007 07:04:43 -0600   Author:  

Re: TCP/IP port exhaustion - Unable to connect to the remote server   
Thank you Michael for taking the time to reply. I read the article many times and I am aware of the
ways to improve the situation.

I took over someone else client side code written in C# and I'm afraid, .Net Web Services is not my
forte. The code reads a file containing about 200,000 requests to be sent to a web application. For
testing right now, the client code and the web application is on the same server.

 I think this forum is the right one, As the last statement of my original post indicates, I want to
know whether it is possible with .Net Web Service to reuse the same connection (port) for every
request.
Date:Fri, 17 Aug 2007 14:34:33 GMT   Author:  

Re: TCP/IP port exhaustion - Unable to connect to the remote serve   
Your connections are probably eaten by NTLM authentication and not the HTTP 
requests. If your web service executes each of the requests using the same 
Windows credentials then you can probably turn on 
UnsafeAuthenticatedConnectionSharing which will prevent your application from 
authenticating for all subsequent requests. This will save you one socket per 
each request.

"Gaetan" wrote:


> Thank you Michael for taking the time to reply. I read the article many times and I am aware of the
> ways to improve the situation.
> 
> I took over someone else client side code written in C# and I'm afraid, .Net Web Services is not my
> forte. The code reads a file containing about 200,000 requests to be sent to a web application. For
> testing right now, the client code and the web application is on the same server.
> 
>  I think this forum is the right one, As the last statement of my original post indicates, I want to
> know whether it is possible with .Net Web Service to reuse the same connection (port) for every
> request. 
> 
Date:Wed, 22 Aug 2007 20:00:01 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us