Odp.Net and WCF (x64) [Solved]
-
I'm having a problem with data access to Oracle via Odp.Net in WCF on a x64 machine (Win 2008 R2 Standard). The weird thing is that the component is working in a windows environment (a windows application on that same server), no problem, but if I call the exact same code via a webservice, nothing happens. Not even an error message. So far I browsed google en found suggestions on - Machine.config - add assembly via web.config - Configure a trust via the OraProvCfg.exe tool from Oracle - Try to copy the Oracle.DataAccess.dll locally (Here the service will crash : Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.) I'm pretty sure that it is some config in IIS or something like that, but can't find the cause. Has anyone had the same issue? How did you solve it? Many thanks in advance.
[Solution]
Maybe in combination with some of the above, I had to add version 4 of the dll (for .Net Framework 4) to the GAC like below. I'm not sure why a win client wouldn't have the same problem though. I think it might be linked to the app pool in IIS.C:\oracle\odp.net\bin\4\OraProvCfg.exe /action:gac /providerpath:C
:\oracle\odp.net\bin\4\Oracle.DataAccess.dll
INFO: c:\oracle\odp.net\bin\4\oracle.dataaccess.dll is registered successfully i
n GAC.Additional info always welcome ;)
V.
-
I'm having a problem with data access to Oracle via Odp.Net in WCF on a x64 machine (Win 2008 R2 Standard). The weird thing is that the component is working in a windows environment (a windows application on that same server), no problem, but if I call the exact same code via a webservice, nothing happens. Not even an error message. So far I browsed google en found suggestions on - Machine.config - add assembly via web.config - Configure a trust via the OraProvCfg.exe tool from Oracle - Try to copy the Oracle.DataAccess.dll locally (Here the service will crash : Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.) I'm pretty sure that it is some config in IIS or something like that, but can't find the cause. Has anyone had the same issue? How did you solve it? Many thanks in advance.
[Solution]
Maybe in combination with some of the above, I had to add version 4 of the dll (for .Net Framework 4) to the GAC like below. I'm not sure why a win client wouldn't have the same problem though. I think it might be linked to the app pool in IIS.C:\oracle\odp.net\bin\4\OraProvCfg.exe /action:gac /providerpath:C
:\oracle\odp.net\bin\4\Oracle.DataAccess.dll
INFO: c:\oracle\odp.net\bin\4\oracle.dataaccess.dll is registered successfully i
n GAC.Additional info always welcome ;)
V.
-
Try using multilayer architecture. Then wcf will not recognise the drivers just the usual classes
-
-
Yes n-tier. Ok can you put the dll in bin folder add reference it from web.config. Its not pool because you are using .net4 pool
-
Try using multilayer architecture. Then wcf will not recognise the drivers just the usual classes