.net application has a device attached to the system is not functioning

0

This is an occasional random error from my 32bit .net application when it connects to sql server.

System.ApplicationException: A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
   at System.Threading.TimerBase.AddTimerNative(Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
   at System.Threading.TimerBase.AddTimer(TimerCallback callback, Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
   at System.Threading.Timer..ctor(TimerCallback callback, Object state, Int32 dueTime, Int32 period)
   at System.Data.ProviderBase.DbConnectionPool.CreateCleanupTimer()
   at System.Data.ProviderBase.DbConnectionPool.Startup()
   at System.Data.ProviderBase.DbConnectionPoolGroup.GetConnectionPool(DbConnectionFactory connectionFactory)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPool(DbConnection owningObject, DbConnectionPoolGroup connectionPoolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

The System.Threading.TimerBase.AddTimerNative() method is an internal call, see Microsoft source code.

I found another link on the web that discussed about CLR Does CLR internally spawns a thread to respond to timer events?

Since I don't know how AddTimerNative is implemented, I don't know the cause of work around this error.

c#
sql
.net-4.0
asked on Stack Overflow Jul 31, 2013 by chris xiao • edited May 23, 2017 by Community

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0