An existing connection was forcibly closed by the remote host - Net 2.0

"Ainsley, Robert, ISD" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
I've got a console application that runs at the end of a series of jobs.
Depending upon the time it takes previous jobs to run, it usually starts
execution between 02:00 and 05:00 local time. It does a series of web
method invocations to a web service on the same server.

About once a week or so, the console application dies with:

"Unhandled Exception: System.Net.WebException: The underlying connection
was closed: A connection that was expected to be kept alive was closed
by the server.
---> System.IO.IOException: Unable to read data from the transport
connection: An existing connection was forcibly closed by the remote
host. 
---> System.Net.Sockets.SocketException: An existing connection was
forcibly closed by the remote host"

The stack traceback is:
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset,
Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32
size)
   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean
userRetrievedStream, Boolean probeRead)
   --- End of inner exception stack trace ---
   at MainModule.Main() in MainModule.vb:line 70

Line 70 is a Catch statement, but I know from the console log which web
method is being invoked when the exception is thrown.

All the web method invocations the console application makes are
synchronous. The only thing different about the one that dies is the
amount of time it takes to execute. The other web methods complete in
under 10 seconds. This one takes about 15 minutes to run. When it dies,
it always runs for at least a few minutes before it fails.

Immediately after the failure, the following entry was made in the
Application Event Log on the server:
Event Type:     Error
Event Source:   .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID:       5000
Date:           1/3/2007
Time:           4:39:28 AM
User:           N/A
Computer:       SA1IWP1
Description:
EventType clr20r3, P1 securitizationupdate.exe, P2 1.0.0.0, P3 456455f3,
P4 securitizationupdate, P5 1.0.0.0, P6 456455f3, P7 14, P8 2ff, P9
system.net.webexception, P10 NIL.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

I entered the event type and source at the above link, but it didn't
find anything.

Does anyone have any idea what is causing this error?

Thanks,

Bob




*****************************************************************************
If you are not the intended recipient of this e-mail, please notify 
the sender immediately. The contents of this e-mail do not amend 
any existing disclosures or agreements unless expressly stated.
*****************************************************************************

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.