【发布时间】:2011-05-31 12:43:14
【问题描述】:
我看到以下异常来自 Windows 7 机器上的 Windows 窗体应用程序。这刚刚开始在这台机器上发生。它在其他机器上仍然可以正常工作,但在特定机器上却不行。
例外:
Exception Type: System.ApplicationException
Message: A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)
Data: System.Collections.ListDictionaryInternal
TargetSite: Void AddTimerNative(System.Object, UInt32, UInt32, System.Threading.StackCrawlMark ByRef)
Source: mscorlib
StackTrace 信息:
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.TimerSetup(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.QuietOpen(IDbConnection connection, ConnectionState& originalState)
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)
这似乎也发生在应用程序中运行的第一个查询上。我可以通过那台机器上的 ODBC 连接连接到数据库服务器,所以我知道这台机器可以看到数据库服务器。有什么建议吗?
【问题讨论】:
-
您是否尝试以管理员身份运行?
-
不知何故让我感到困惑,但我认为他们以前没有以管理员身份运行它。我会尝试并报告。谢谢。
-
这不需要管理权限。听起来那台机器坏了。
-
@SLaks,我想你就在这里。反正我试过了,结果还是一样。