首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >c#应用程序停止工作System.InvalidOperationException

c#应用程序停止工作System.InvalidOperationException
EN

Stack Overflow用户
提问于 2017-04-24 10:19:54
回答 1查看 763关注 0票数 0

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

代码语言:javascript
运行
复制
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框架4.5.2,并将其设置为支持任何cpu (这也是我在服务器上所做的其他应用程序所支持的)。

我被困在这上面已经有一段时间了,我会感谢你的帮助!

<更新>

代码语言:javascript
运行
复制
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()

误差2

代码语言:javascript
运行
复制
Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: Personeel.exe
P2: 1.0.0.0
P3: 58fde3b6
P4: System.Data
P5: 4.6.1055.0
P6: 563c13ab
P7: 2599
P8: 5d
P9: System.InvalidOperationException
P10: 

Attached files:

These files may be available here:
C:\Users\adminjm\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Personeel.exe_38e793e1fc55b81cf5d8dd87c6ca47643294bd9f_3b8a8d3f_20d7d235

Analysis symbol: 
Rechecking for solution: 0
Report Id: d8ff9f36-28e2-11e7-8178-000c293bf429
Report Status: 2048
Hashed bucket: 

错误3:

代码语言:javascript
运行
复制
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: 

EN

回答 1

Stack Overflow用户

发布于 2017-04-24 11:51:00

正如其他人在评论中所说的,我们需要看到一些代码来确定地知道.

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

代码语言:javascript
运行
复制
System.Data.OleDb.OleDbServicesWrapper.GetDataSource(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.DataSourceWrapper ByRef)

表明异常是由OLEDB调用引发的.由于您说它在一台服务器上工作,而不是在另一台服务器上工作--我将首先检查两个服务器所使用的用户帐户。我想它们是不同的,而不起作用的应用程序对应用程序正在使用的数据源没有适当的权限(数据库的SQL权限?)它读取的Excel/CSV文件的文件权限?)

您至少可以为您的Personeel.Presenter.HomePresenter.loadMedewerkers()方法发布代码,因为这似乎是您的代码中调用其他东西的最后一个地方。

你试过看活动日志了吗?这应该会记录异常,希望有一个更有用的错误消息?但我们真的需要看一些代码才能知道出了什么问题.

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43585515

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档