首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

到另一台电脑安装并运行发布出来的程序出现登录异常(开发环境VS05+SQL05)

2012-06-03 
到另一台电脑安装并运行发布出来的程序出现登录错误(开发环境VS05+SQL05)有关调用实时(JIT)调试而不是此对

到另一台电脑安装并运行发布出来的程序出现登录错误(开发环境VS05+SQL05)


有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.Data.SqlClient.SqlException: 用户 'TIANYE001\Guest' 登录失败。
  在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
  在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
  在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
  在 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
  在 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
  在 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
  在 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
  在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
  在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
  在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
  在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
  在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
  在 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
  在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
  在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  在 System.Data.SqlClient.SqlConnection.Open()
  在 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
  在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
  在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
  在 学籍管理程序.xjglDataSetTableAdapters.xjbTableAdapter.Fill(xjbDataTable dataTable)
  在 学籍管理程序.Input.Input_Load(Object sender, EventArgs e)
  在 System.Windows.Forms.Form.OnLoad(EventArgs e)
  在 System.Windows.Forms.Form.OnCreateControl()
  在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
  在 System.Windows.Forms.Control.CreateControl()
  在 System.Windows.Forms.Control.WmShowWindow(Message& m)
  在 System.Windows.Forms.Control.WndProc(Message& m)
  在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
  在 System.Windows.Forms.Form.WmShowWindow(Message& m)
  在 System.Windows.Forms.Form.WndProc(Message& m)
  在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)


  在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3082 (QFE.050727-3000)
  基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
学籍管理程序
  程序集版本: 1.0.0.0
  Win32 版本: 1.0
  基本代码: file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Apps/2.0/BODTMGP9.0B3/93BHA0ZM.MR3/.app..tion_368d5b09e391d029_0001.0001_568bfc1147c0d2da/学籍管理程序.exe
----------------------------------------
System.Windows.Forms
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3082 (QFE.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.resources
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.42 (RTM.050727-4200)
  基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3082 (QFE.050727-3000)
  基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Configuration
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Transactions
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
  程序集版本: 2.0.0.0
  Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
  基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如: 

<configuration>
  <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。




[解决办法]
说得很明显了,
数据库连接错了
你换了一台机器了


连接没有换?
[解决办法]
Guest登陆失败, 
允许guest去连接sqlserver
检查连接字符串
[解决办法]
链接字符串里uid=guest?那你B机也要开个guest账户才行嘛
[解决办法]

探讨
应该是这个问题,烦您再详细说说:
我在A机上开发并发布成功的程序(环境是SQL2005)如何正确设置数据连数,如何把数据库一并发布出来
以便让我在B机安装时也能使用该库(B机装有SQL2005 EXPRESS)

[解决办法]
说得很明显了,
数据库连接错了

热点排行