I created ASP.Net web application in Visual Studio 2013. This application uses Sybase.Data.AseClient.dll to connect to Sybase database.
When I press F5 and debug application then it runs fine. No issues. But when I publish it using VS in C:\inetpub\wwwroot folder then I get following error when trying to browse the website:
The type initializer for 'Sybase.Data.AseClient.AseConnection' threw an exception.
How do I fix this issue?
EDIT
Inner exception being thrown is shown below.
System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at Sybase.Data.AseClient.Unmanaged.AseGetDriverVersion(StringBuilder value, Int32 capacity) at Sybase.Data.AseClient.AseConnection.CheckVersion()