I am getting the following error in one of my C# ASP.NET MVC applications:
The type initializer for 'Sybase.Data.AseClient1.AseConnection' threw an exception
Notice that it says AseClient1
and not AseClient
, so I am not sure from where this 1 is coming from.
I have tried placing 32 bit and 64 bit version of both Sybase.AdoNet2.AseClient.dll
and Sybase.AdoNet4.AseClient.dll
in the bin
directory of the application - but no luck.
The error is not appearing on my Dev machine where I can use both 32 bit and 64 bit versions of Sybase DLL and it works. I simply press F5 in Visual Studio 2013 and the application runs without any issues. The error only happens on another machine where the application is hosted on IIS.
Any idea how to fix this issue?