c#应用程序已停止工作系统。InvalidOperationException

c#应用程序已停止工作系统。InvalidOperationException,c#,windows,visual-studio,C#,Windows,Visual Studio,在Visual Studio 2015中发布我的应用程序并将发布文件放在远程服务器上后,我不断收到以下错误: Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: Personeel.exe Problem Signature 02: 1.0.0.0 Problem Signature 03: 58fdcdf8 Problem Signature 04: System.Data Pro

在Visual Studio 2015中发布我的应用程序并将发布文件放在远程服务器上后,我不断收到以下错误:

Problem signature:
  Problem Event Name:   CLR20r3
  Problem Signature 01: Personeel.exe
  Problem Signature 02: 1.0.0.0
  Problem Signature 03: 58fdcdf8
  Problem Signature 04: System.Data
  Problem Signature 05: 4.6.1055.0
  Problem Signature 06: 563c13ab
  Problem Signature 07: 2599
  Problem Signature 08: 5d
  Problem Signature 09: System.InvalidOperationException
  OS Version:   6.3.9600.2.0.0.16.7
  Locale ID:    1033
  Additional Information 1: 74ac
  Additional Information 2: 74acff91be3a79a847a4c136374196b5
  Additional Information 3: ff07
  Additional Information 4: ff07fc8188fb2691835f1a2bee1f0e1f

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=280262

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
之后,我只能关闭应用程序,但什么都不起作用。奇怪的是,在旧的远程服务器(旧版本不是2012 MS)上使用的是完全相同的代码。我多次检查.net framework是4.5.2,它被设置为支持任何cpu(这也是我在服务器上开发的其他应用程序所支持的)

我已经被困在这个问题上有一段时间了,希望能得到一些帮助

Application: Personeel.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
   at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.DataSourceWrapper ByRef)
   at System.Data.OleDb.OleDbConnectionInternal..ctor(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.OleDbConnection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(System.Data.Common.DbConnectionOptions, System.Data.Common.DbConnectionPoolKey, System.Object, System.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionPoolGroup, System.Data.Common.DbConnectionOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(System.Data.Common.DbConnection, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions, System.Data.ProviderBase.DbConnectionInternal, System.Data.ProviderBase.DbConnectionInternal ByRef)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory, System.Threading.Tasks.TaskCompletionSource`1<System.Data.ProviderBase.DbConnectionInternal>, System.Data.Common.DbConnectionOptions)
   at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(System.Data.Common.DbConnection, System.Data.ProviderBase.DbConnectionFactory)
   at System.Data.OleDb.OleDbConnection.Open()
   at Lemerij.Repository.LemerijRepository.openConnections()
   at Lemerij.Repository.LemerijRepository..ctor()
   at Personeel.Presenter.HomePresenter.loadMedewerkers()
   at Personeel.Presenter.HomePresenter..ctor(Personeel.View.Home)
   at Personeel.View.Home..ctor()
   at Personeel.Program.Main()
错误3:

Faulting application name: Personeel.exe, version: 1.0.0.0, time stamp: 0x58fde3b6
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18202, time stamp: 0x569e7eb1
Exception code: 0xe0434352
Fault offset: 0x0000000000008a5c
Faulting process id: 0x11d4
Faulting application start time: 0x01d2bcef9b236481
Faulting application path: C:\Users\adminjm\AppData\Local\Apps\2.0\O4ONW6JV.BT5\T7KCVD16.B8Y\pers..tion_7ca3505acee249c8_0001.0000_0d30d07889d3915c\Personeel.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: d8ff9f36-28e2-11e7-8178-000c293bf429
Faulting package full name: 
Faulting package-relative application ID: 


正如其他人在评论中所说,我们需要看到一些代码才能确定

但是,堆栈跟踪中的最后一个调用

System.Data.OleDb.OleDbServicesWrapper.GetDataSource(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.DataSourceWrapper ByRef)
表明异常是由OLEDB调用引发的。。。既然您说它在一台服务器上工作,但在另一台服务器上不工作,那么我首先要检查两台服务器使用的用户帐户。我猜它们是不同的,不工作的应用程序对您的应用程序正在使用的任何数据源都没有适当的权限(数据库的SQL权限?读取Excel/CSV文件的文件权限?)

你至少可以为你的网站发布代码 Personeel.Presenter.HomePresenter.LoadMedWerkers() 方法,因为它似乎是代码中调用其他东西的最后一个位置


您是否尝试查看事件日志??这应该记录异常,希望有更有用的错误消息?但是我们真的需要看一些代码才能知道出了什么问题……

也许发布一些代码,没有人能像这样帮助您调试工作吗?程序大约有205k行,我怀疑我会让任何人满意。代码在其他计算机/服务器上正常工作。只是这种特殊情况不起作用。调试工作正常,但本地系统运行良好。我无法在服务器上调试,因为它没有VS@DennisMuller。您需要获取的不仅仅是错误名称。具体来说,您需要获取堆栈跟踪以指示错误发生的位置。没有这个,你就是在黑暗中射击。在eventviewer->application中查找并查找源“.net runtime”中的错误。这可能是获取stacktrace的最快方法。否则,请登录到您的程序并重新部署。很好,代码是用需要的特定方法更新的,代码小到可以上传!无论如何,感谢您的输入,作为最后的通知,数据库是一个MDB(access),发布的3个错误是来自服务器的事件日志,除此之外,我没有任何其他StackTrace。如果这不能解决它,我将不得不在一个手动StackTracew中构建,你有一个连接字符串的整个负载。。。。您确定在两台服务器上都安装了所需的驱动程序(我想是Ace for access?)吗?你检查过它运行的用户帐户了吗?@Soldexio也许可以看看这个问题:类似的错误数据库不幸是由一个不知情的人创建的,公司不想改变结构,所以我不得不处理存在的问题。我将研究一下您所说的,驱动程序至少存在,因为其他正在运行和工作的应用程序使用相同的连接字符串
System.Data.OleDb.OleDbServicesWrapper.GetDataSource(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.DataSourceWrapper ByRef)