Hi experts, I developed a web service that connects to an oracle database and I have the following error:
System.InvalidOperationException: Attempting to load the Oracle client libraries threw BadImageFormatException. This problem will occur when running 64-bit mode with the client component 32-bit Oracle installed. ---> System.BadImageFormatException: Attempt to load a program with an incorrect format. (Exception from HRESULT: 0x8007000b)
en System.Data.Common.UnsafeNativeMethods.OCILobCopy2(IntPtr svchp, IntPtr errhp, IntPtr dst_locp, IntPtr src_locp, UInt64 amount, UInt64 dst_offset, UInt64 src_offset)
en System.Data.OracleClient.OCI.DetermineClientVersion()
--- Fin del seguimiento de la pila de la excepción interna ---
en wsConsultarInscripciones.consultar.MostrarCursosHabilitadosPAP() en C:\Users\elopez\Documents\AMAG\slnWSExcelInscritos\wsConsultarInscripciones\consultar.asmx.cs:línea 48
My machine is windows seven of 64 bits.
I executed the project in 32 bit and 64-bit and I have the same error. Attached Image
This is my code:
[WebMethod]
public DataSet MostrarCursosHabilitadosPAP()
{
OracleConnection con;
OracleCommand cmd;
OracleDataAdapter adpt;
DataSet ds = new DataSet();
string SP = "pckCurso.upCursosHabilitadosPAPws";
con = new OracleConnection(ConfigurationManager.ConnectionStrings["OracleDesa"].ConnectionString);
http://visualstudiohacks.com/articles/visual-studio-net-platform-target-explained/