We're getting the following System.ArgumentNullException intermittently in our WCF service: "Value cannot be null.
Parameter name: connection". Our code calls the LoadDataSet(DbCommand command, DataSet dataSet, string tableNames) method in Microsoft.Practices.EnterpriseLibrary.Data Database.cs. We've had app downtime three times in the last week due to this issue
and urgently need to get it fixed.
The pattern is always the same: It starts with a random "The SqlTransaction has completed. It is no longer usable." error thrown by our code. I'm guessing this error occurs when a network issue breaks the database connection. Then, for 10-25 minutes,
the EntLib is completely unable to connect to the database, throwing the ArgumentNullException each time. After 10-25 minutes, the error clears up by itself. We can fix it earlier by cycling the app pool in IIS.
The issue has occasionally happened before but never with this severity. There may be increased network issues between the server and database, but the EntLib should be able to recover from a dropped connection. Is the bad connection getting cached somehow
Type : System.ArgumentNullException, mscorlib, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Value cannot be null.
Parameter name: connection
Source : Microsoft.Practices.EnterpriseLibrary.Data
Help link :
ParamName : connection
Data : System.Collections.ListDictionaryInternal
TargetSite : Void PrepareCommand(System.Data.Common.DbCommand, System.Data.Common.DbConnection)
Stack Trace : at Microsoft.Practices.EnterpriseLibrary.Data.Database.PrepareCommand(DbCommand command, DbConnection connection)
at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableNames)
at WebQuote.DataAccess.SqlClient.SqlDatabaseEx.LoadDataSet(DbCommand command, DataSet dataSet, string tableNames)
at WebQuote.DataAccess.DbAccess.ExecuteCommand(DbCommand command, DataSet ds)
at WebQuote.DataAccess.DOQuote.GetChannelAndSalesOrgByCustId(String custId)
at WebQuote.BusinessLogic.ServiceLibrary.GetChannelAndSalesOrgByCustId(String custId)
Thank you very much in advance,