0
我写了一个使用SMO的应用程序,它安装并在我的开发PC上运行良好,甚至安装在另一个位置并运行它,但是当我将它移动到另一台机器时,错误如何让SMO应用程序在另一台机器上工作
Log Name: Application
Source: .NET Runtime
Date: 4/10/2012 12:03:56 PM
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ip-0A3AF6C2
Description:
Application: DataExport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.SqlServer.Management.Common.ConnectionFailureException
Stack:
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at DataExport.Data.SqlDataService.GetTableNames(System.String)
at DataExport.Adapter.DataExportAdapter.GetTableNames(System.String)
at DataExport.DataExportForm.SetInitialEditDisplay(DataExport.Adapter.IDataExportAdapter)
at DataExport.DataExportForm..ctor(DataExport.Adapter.IDataExportAdapter)
at DataExport.Program.Main()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-04-10T11:03:56.000Z" />
<EventRecordID>72945</EventRecordID>
<Channel>Application</Channel>
<Computer>ip-0A3AF6C2</Computer>
<Security />
</System>
<EventData>
<Data>Application: DataExport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.SqlServer.Management.Common.ConnectionFailureException
Stack:
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at DataExport.Data.SqlDataService.GetTableNames(System.String)
at DataExport.Adapter.DataExportAdapter.GetTableNames(System.String)
at DataExport.DataExportForm.SetInitialEditDisplay(DataExport.Adapter.IDataExportAdapter)
at DataExport.DataExportForm..ctor(DataExport.Adapter.IDataExportAdapter)
at DataExport.Program.Main()
</Data>
</EventData>
</Event>
我不知道如何解决这个问题,SMO DLL是包含在包
是否有任何possiblility是SMO的旧版本(前10)overridi包括dll在内?
它可以帮助,如果你能显示代码,其中例外情况会发生,并且会有一点变化(例如,ISalonDataExport.DataExportForm ..ctor会很有趣)。我确定你已经检查过这个,但你没有使用本地主机或任何东西,并且sql server在不同的机器上? – kmp 2012-04-10 11:19:15
它从app.config中的加密部分加载配置。 – 2012-04-10 11:21:06
“有没有任何可能性让旧版本的smo(前10)重写包含的dll?” - 是的,我认为是这样的...... Sho这可能不是一个确切的答案,更多的是你尝试过这个......但是我有类似的smo和部署问题,我最终复制了smo相关的dll从我的sql实例连接到远程计算机上。确保你的解决方案也使用它们。像删除,并通过浏览重新添加它们,你复制DLL的。 – 2012-04-10 11:26:49