I have a RESTful Api that inserts,deletes,updates and gets data from Oracle database. I have installed Oracle on my pc.
The app cracked continously, saying that Could not load file or assembly 'Oracle.DataAccess.I changed the Target platform of my project to x86 and it worked.
I am using a Chrome extension called Restlet Client to verify data that i am getting. If I am not using Oracle objects at all, it works and it gives me status ok.
public IEnumerable<string> Get()
{
return new string[] { "1", "2" };
}
If I am using Oracle object to connect to database like this
public IEnumerable<string> Get()
{
DataSet ds;
using (OracleConnection conn = new OracleConnection(ConfigurationManager.ConnectionStrings["Licenta"].ConnectionString))
{
OracleDataAdapter adapter = new OracleDataAdapter(selectUsers,conn);
ds = new DataSet();
adapter.Fill(ds);
}
return new string[] { "1", "2" };
}
Do you know why ?
I also tried with a dummy website and I have the same problem.