I've recently started receiving this error: "Internal connection fatal error" from my application. The error occurs randomly. When it happens my application is unusable for the next few minutes.

After careful analysis of the error I've concluded that this error happens in only one method within my application. This method fires a series of simple ordinary SQL queries but it does involve multithreading however all threads should be disposed before this block of code. The error happens always on a specific SQL query. For test I've eliminated this query which resulted in error happening on next in line query.

This is stack strace:

Internal connection fatal error.

-------------- Stack trace ---------------
   at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.IntentionalRethrow(Exception chainException, Exception originalException)
   at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.RethrowRecommended(Exception chainException, Exception originalException)
   at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.Handle(Exception exceptionToHandle)
   at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyImpl.HandleException(Exception exceptionToHandle)
   at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception exceptionToHandle, String policyName, ExceptionPolicyFactory policyFactory)
   at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception exceptionToHandle, String policyName)
   at Base.Sql.ExecuteScalar()

Application is built on .NET 3.5 and it obviously uses Enterprise Library Data Access. Application is run on Win2003 Terminal Server and it's using Sql Server 2005 database which is on different server.

The method which causes this error is not triggered from GUI but from command line if that is of any significence.

Edit
Report