Error:The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception
Hello All,
I am developing custom class-library project using ESRI product called ArcGIS Desktop. This is developed using C# and targeting Microsoft.NET 3.5.
This project uses Oracle.DatAccess from C:\Oracle\product\10.2.0\client_32\ODP.NET\bin\1.x. This project is working fine as a windows application.
When this project is published as a REST service, application throws an error Error:The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception
on the line connection = new OracleConnection(constr). I am developing and publishing in same server. Below are environment details
- Server: Windows 2012 64bit Operating System
- Installed both oracle 32 and oracle 64bit (C:\oracle\product\10.2.0\Client_32, C:\oracle\product\10.2.0\Client_64)