This content has been marked as final. Show 6 replies
I have no luck on ODP.NET 10g either.
The message I got:
System.BadImageFormatException was unhandled
Message="Could not load file or assembly 'Oracle.DataAccess, Version=220.127.116.11, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Mark, have you tried it in Windows Server 2008 x64?
I was getting the same error in a new win forms app (.net 2.0 vs 2005). I was thinking this was very odd as I had a asp.net app working fine with pretty much the same code.
When I glanced at Mark Williams comment on the thread above regarding all the x64/64-bit stuff it all came back to me.. I'm running XP x64 edition. And installed the x86 (32bit) ODAC 11.1 (which is all that is out at this time). Is VS need to create a new target solution platform config (that little drop box at the top that says Any CPU by default). All is well in my world now.
Hope this helps somebody out there further.
499179 wrote:Why I cannot open the link here? Is the link invalid?
Mark's answer posted in this thread <font face="tahoma,verdana,sans-serif" size="1" color="#000">might</font> help you -
<A class=jive-link-external href="http://forums.oracle.com/forums/thread.jspa?threadID=697883">Problems with RelationalDataSample exceptions thrown from VS2005
The problem comes as stated from the application pool and it's instantiation of your object. I run a series of applications on Windows 2008 R2 x64 and have come up with a great solution.
1. Install both of the oracle clients (x86 and x64). Use a common oracle home directory such as C:\oracle. You'll end up with a product\version\client_1 and client_2 directory.
2. Place your TNS names file with your services in both of the network\admin directories.
3. When running under IIS 7.5 with the 64bit clients, even if your application was compiled in x86 - corflag the assemblies. I corflag all items in the bin folder using the following: for %i in (*.dll) do corflags %i /32bit- corflags is included with the windows sdk.
Note: You can change them back. If you have clients who were compiled using older versions of oracle, refer to the odp.net documentation on installation of the policy files into the gac using gacutil /i policy.XXX dll You'll find them under the odp.net area of your oracle installation.