I've got a .NET Framework V1.1 web service running on a Windows 2003 Server
that has 2 web methods that are called from a web application on the same
server.
One is a fire-and-forget method that executes a long running process that
results in a database being updated.
The other is a normal syncronous method that returns configuration
information to the caller.
They both log their errors to the application event log.
The first thing the fire-and-forget web service does is validate that the
user is allowed to execute the web method. If the user is not allowed, an
error is logged to the event log and the web method terminates. Next it
updates a database indicating that a certain operation is taking place. After
that, it goes about executing a series of complex and time-consuming SQL
queries, hence the reason it's a web method, and the last thing it does is
update a database to indicate that operation has completed.
The second method simply returns the HttpContext.Current.User.Identity.Name
and the version number from the currently executing assembly.
The symptoms are: calling the fire-and-forget method never executes, but
doesn't generate an error. This is evident because the database that
indicates the operation is taking place is never updated.
Calling the second method results in a long wait followed by the error:
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive.
Does anyone have any ideas about:
1) How to get the web service to start responding without rebooting the
server.
2) Preventing the web service from getting into this state to begin with.
Thanks.