c# application stopped working System.InvalidOperationException

0

After I publish my application in Visual Studio 2015 and put the publish files on the remote server, I keep getting the following error:

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

Afterwards I can only close the application and nothing is working. The strange thing is that the exact same code is working on the old remote server (older version not 2012 MS). I checked multiple times the .net framework is 4.5.2 and it is set to support any cpu (which is what is supported by other application also made by me on the server).

I've been stuck on this for a while now and some help would be appreciated!

< Update >

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()

Error 2

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: 

Error 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: 

c#
windows
visual-studio
asked on Stack Overflow Apr 24, 2017 by Soldexio • edited Apr 24, 2017 by Soldexio

1 Answer

0

As others have said in the comments, we need to see some code to know for sure...

However the last call in your stack trace;

System.Data.OleDb.OleDbServicesWrapper.GetDataSource(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.DataSourceWrapper ByRef)

Suggests that the exception is being thrown by an OLEDB call... Since you said it works on one server but not the other - I would first check the user accounts used by both servers. I would guess they are different and the one that is not working does not have proper permissions for whatever Data Source your application is using (SQL permissions for database? File permissions for Excel/CSV file it reads?)

You could at the very least post the code for your Personeel.Presenter.HomePresenter.loadMedewerkers() method as that seems to be the last place in your code that is calling some other things...

Did you try looking in the Event Log?? This should have the exception logged, hopefully with a more useful error message? But we really have to see some code to know what is going wrong...

answered on Stack Overflow Apr 24, 2017 by Milney

User contributions licensed under CC BY-SA 3.0