Uma conexão estabelecida foi abortada pelo software em sua máquina host

Desculpe se isso é um pouco longo, mas achei melhor postar mais do que menos.

Este é também o meu primeiro post aqui, então, por favor, perdoe.

Eu tenho tentado descobrir isso por algum tempo. e sem sucesso, esperando que haja um gênio por aí que tenha encontrado isso antes.

Este é um problema intermitente e tem sido difícil de reproduzir. O código que estou executando simplesmente chama um serviço da Web. A chamada de serviço da Web está em um loop (para que possamos fazer isso muito, 1500 vezes ou mais)

Aqui está o código que está causando o erro:

HttpWebRequest groupRequest = null;
WebResponse groupResponse = null;            
try
{    
    XmlDocument doc = new XmlDocument();
    groupRequest = (HttpWebRequest)HttpWebRequest.Create(String.Format(Server.HtmlDecode(Util.GetConfigValue("ImpersonatedSearch.GroupLookupUrl")),userIntranetID));
    groupRequest.Proxy = null;
    groupRequest.KeepAlive = false;
    groupResponse = groupRequest.GetResponse();
    doc.Load(groupResponse.GetResponseStream());
    foreach (XmlElement nameElement in doc.GetElementsByTagName(XML_GROUP_NAME))
    {
         foreach (string domain in _groupDomains )
         {
             try
             {
                 string group = new System.Security.Principal.NTAccount(domain, nameElement.InnerText).Translate(typeof(System.Security.Principal.SecurityIdentifier)).Value;
                 impersonationChain.Append(";").Append(group);                            
                 break;
             }
             catch{}                        
         } // loop through            
     }
 }
 catch (Exception groupLookupException)
 {
     throw new ApplicationException(String.Format(@"Impersonated Search ERROR:  Could not find groups for user<{0}\{1}>", userNTDomain, userIntranetID), groupLookupException);
 }
 finally
 {
     if ( groupResponse != null )
     {
         groupResponse.Close();
     }
 }

Aqui está o erro que acontece às vezes:

Could not find groups for user<DOMAIN\auser> ---> System.IO.IOException: Unable to read
data from the transport connection: An established connection was aborted by the
software in your host machine. ---> System.Net.Sockets.SocketException: An established  
connection was aborted by the software in your host machine 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.ConnectStream.Read(Byte[]  
buffer, Int32 offset, Int32 size) at System.Xml.XmlTextReaderImpl.ReadData() at  
System.Xml.XmlTextReaderImpl.ParseDocumentContent() at  
System.Xml.XmlLoader.LoadDocSequence  
(XmlDocument parentDoc) at System.Xml.XmlDocument.Load(XmlReader reader) at
System.Xml.XmlDocument.Load(Stream inStream) at  
MyWebServices.ImpersonatedSearch.PerformQuery(QueryParameters parameters,  
String userIntranetID, String userNTDomain)--- End of inner exception stack trace  
---at MyWebServices.ImpersonatedSearch.PerformQuery(QueryParameters parameters, String userIntranetID, String userNTDomain)  
--- End of inner exception stack trace ---  
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message,  
WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,  
Object[] parameters) at MyProgram. MyWebServices.ImpersonatedSearch.PerformQuery  
(QueryParameters parameters, String userIntranetID, String userNTDomain)  
at MyProgram.MyMethod()

Desculpe, foi um monte de código para ler.
Isso acontece cerca de 30 vezes em torno de 1700

questionAnswers(1)

yourAnswerToTheQuestion