FileLoadException with Oracle.DataAccess

Hello, I get the following error when I try to run my application on the app server. It works fine on my development box. Details on the server's configuration are below the error message.
**** BEGIN ERROR MESSAGE ****
System.IO.FileLoadException: The located assembly's manifest definition with name 'Oracle.DataAccess' does not match the assembly reference.
File name: "Oracle.DataAccess"
at msd.jobevaluation.frmLogon.cmdOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
=== Pre-bind state information ===
LOG: DisplayName = Oracle.DataAccess, Version=1.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342
(Fully-specified)
LOG: Appbase = G:\Program Files\Metropolitan Sewer District\HR Job Evaluation [.NET]\bin\
LOG: Initial PrivatePath = NULL
Calling assembly : MSD.JobEvaluation, Version=2.0.2804.21439, Culture=neutral, PublicKeyToken=null.
===
LOG: Publisher policy file is found at G:\WINNT\assembly\GAC\policy.1.102.Oracle.DataAccess\1.102.3.0__89b483f429c47342\Policy.1.102.Oracle.DataAccess.config.
LOG: Publisher policy file redirect is found: 1.102.2.20 redirected to 1.102.3.0.
LOG: Host configuration file not found.
LOG: Using machine configuration file from G:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=1.102.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: Attempting download of new URL file:///G:/Program Files/Metropolitan Sewer District/HR Job Evaluation [.NET]/bin/Oracle.DataAccess.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2407
CodeBase: file:///g:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
MSD.JobEvaluation
Assembly Version: 2.0.2804.21439
Win32 Version: 2.0.2804.21439
CodeBase: file:///G:/Program%20Files/Metropolitan%20Sewer%20District/HR%20Job%20Evaluation%20%5B.NET%5D/bin/MSD.JobEvaluation.exe
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2407
CodeBase: file:///g:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
System.Data.OracleClient
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.data.oracleclient/1.0.5000.0__b77a5c561934e089/system.data.oracleclient.dll
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///g:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
**** END ERROR MESSAGE ****
I have done some diagnostic work, and it appears to me that Policy.1.102.Oracle.DataAccess is being invoked, which redirects to ODP version 1.102.3.0. The problem is that in the GAC, and in my application's /bin directory, the Oracle.DataAccess version is 1.102.2.20. I don't think that 1.102.3.0 exists on this server, and I don't know how to get it. Is it from a patch that might need to be installed?
How can I fix this? I'm not very experienced with assembly configuration, binding redirects, and all that. Any help would be appreciated.
Additional information:
* .NET Framework 1.1
* Windows 2000 server SP-4
* VS.Net 2003
* gacutil /l Oracle.DataAccess = oracle.dataaccess, Version=1.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342, Custom=null
* gacutil /l Policy.1.102.Oracle.DataAccess - Policy.1.102.oracle.dataaccess, Version=1.102.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, Custom=null

Thanks! That got me a little farther down the road. The FileLoadException error went away, but now I am getting the following:
System.TypeInitializationException: The type initializer for "Oracle.DataAccess.Client.OracleConnection" threw an exception. ---> Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
at Oracle.DataAccess.Client.OracleConnection..cctor()
--- End of inner exception stack trace ---
at Oracle.DataAccess.Client.OracleConnection..ctor()
at msd.jobevaluation.frmLogon.cmdOK_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2407
CodeBase: file:///g:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
MSD.JobEvaluation
Assembly Version: 2.0.2804.21439
Win32 Version: 2.0.2804.21439
CodeBase: file:///G:/Program%20Files/Metropolitan%20Sewer%20District/HR%20Job%20Evaluation%20%5B.NET%5D/bin/MSD.JobEvaluation.exe
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2407
CodeBase: file:///g:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
System.Data.OracleClient
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.data.oracleclient/1.0.5000.0__b77a5c561934e089/system.data.oracleclient.dll
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///g:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///g:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
Oracle.DataAccess
Assembly Version: 1.102.2.20
Win32 Version: 1.102.2.20
CodeBase: file:///g:/winnt/assembly/gac/oracle.dataaccess/1.102.2.20__89b483f429c47342/oracle.dataaccess.dll
**** END ERROR MESSAGE *****
I don't understand why I am getting this one because I'm very confident that my ODP versions are correct.

Similar Messages

  • Connect to oracle database with Oracle.DataAccess.Lite_wce.dll

    With Oracle.DataAccess.Lite_wce.dll i want to ceonnect to oracle database.
    I try like:
    OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=baza1)));User Id=xx;Password=xx;");
    conn.Open();
    but it said "S1000[POL-3023] the database does not exist".
    What i am doing wrong?

    what client are you using if you are using windows mobile then
    use
    Oracle.DataAccess.Lite.dll on the handheld
    connection string is "dsn=databasename;uid=SYSTEM;pwd=userpassword"
    the username is always system, the passw0rd the the user password of the specific user that the handheld is created for, the database name depends you can see it in the device->orace->odbc.txt file
    if your re on c# then you should write
    using Oracle.DataAccess.Lite;
    LiteConnection OraCon;
    OraCon = new LiteConnection(connectionstring);
    OraCon.Open();

  • Very slow first connection with Oracle.DataAccess 4.112.1.2

    Hello, I'm having some troubles with connecting using Oracle DataAccess component. In particular, when using .Net 4 Framework, the first connection to the database takes about 20-25 seconds!
    Here's my setup:
    - Web server running 64-bit Windows Web Server 2008 SP2 with IIS 7.0
    - Oracle server running 64-bit Windows Server Standard 2008 SP2 with Oracle 11g
    The version of ODAC component is 2.112.1.2 / 4.112.1.2
    The first strange thing is that, when I set an application on .NET 4 in IIS, I need to "Enable 32-bit Application" in order for it to work.
    I made some tests with a very simple query: "SELECT 1 FROM dual" and here's the results:
    - Classic ASP (ADODB.Connection): a fraction of a second to connect
    - .NET 2 with System.Data.OracleClient: a fraction of a second to connect
    - .NET 4 with Oracle.DataAccess: 20-25 seconds
    Moreover, if I launch the first connection thru Classic ASP, then the .NET 4 connection is very fast, as it happen in any case from the second connection on...
    This way, I excluded the problem is in the connection string, since it's always pretty much the same. I also excluded it could be a TNS problem, since they all use the same TNS (I think).
    That's all I've come up with, and I'm not a big Oracle expert so I hope someone here can help me sorting the situation out!
    Thanks,
    Stefano

    Thanks for your reply.
    I already tried messing around with that parameter.
    At the moment, it was set as:
    SQLNET.AUTHENTICATION_SERVICES= (NONE)
    I commented it and nothing changed.
    Thanks anyway :)

  • Problems with Oracle.DataAccess assembly after installing Oracle 11gR2

    Windows 7 x64 SP1
    Visual Studio 2010
    ODAC112012
    Oracle 11gR2 11.2.0.1.0 for Windows x64
    Oracle Patch 12429529
    IIS 7.0
    I had my development machine setup and working with all of the above items except for the Oracle 11gR2(and patch), I was using a separate Oracle server. However everything went bad after the installation of 11gR2, I get the following error when trying to run the web application: "Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.10, Culture=neutral'"...
    My application is built in .NET 3.5 and the application pool is in 32 bit mode in IIS 7.
    Do I have to do something with the assembly rebind trick?:
    C:\Windows\assembly\GAC_32\Policy.2.102.Oracle.DataAccess\2.112.1.2__89b483f429c47342>Policy.2.102.Oracle.DataAccess.config
    Any help is very appreciated.

    I don't run Oracle server locally just avoid stuff like this, but since you installed an x64 server while having the application running in x86 mode, one potential issue is that the binding redirect you were using is no longer working because it's set for the 64 bit version instead. You don't have 2.111.7.10 on the machine at all, so try deleting that reference and pointing directly at your ODAC version.
    Alternately reconfigure the project to compile for x64 and disable 32 bit mode in IIS, then use the 64 bit client.

  • Oracle.DataAccess 2.112.1.0 - Connection Pool Problem

    Hi,
    Oracle.DataAccess 2.112.1.0 is having connection pool problem. The no. of TCP connections to Oracle database keep increasing untill the server's session run out of limit. My application created connections, use them, close them, and dispose them properly. When using previous Oracle.DataAccess 2.111.6.20, the no. of TCP connections do not increase.
    My database connection string has "Min Pool Size = 3 and Max Pool Size = 150".
    With 2.111.6.20 version, TCP connection stays at 3.
    With 2.112.1.0, TCP connection keep increasing for every 5 minutes. I've tried to disable Self Tuning, but still can't prevent the connections from increasing.
    Later today, I downloaded Oracle.DataAccess 2.112.1.2 (it comes with ODAC 11.2.0.1.2) and test again, the problem is resolved... no more connection increases... but.... it is only for 32 bit Windows.
    Unfortunately, there is no Oracle.DataAccess 2.112.1.2 for 64 bit Windows Server 2008.
    May I know how can i resolve this problem on 64bit Window installed with Oracle 11g R2 client, which comes with Oracle.DataAccess 2.112.1.0, which has serious problems...(according to this 11.2 ODP.NET causing test runner failures )
    Many thanks for your time and answers!
    Edited by: user1502907 on 04-Sep-2010 23:01

    Hi,
    The only thing that jumps out within your problem description is that connections are being increased every 5 minutes. Are you sure its every 5 minutes and not 3 minutes which is the timing interval used by the Connection Pool facility to perform connection pool maintenance. If this occurs even when the application is idle then you could be running into the following known issue filed against 11.2.0.1.0 and fixed in 11.2.0.1.2.
    Bug 9711600 - CONNECTIONS INCREASE BEYOND MAX POOL SIZE EVERY 3 MINUTE
    This is specific to using the option CommandBehavior.CloseConnection when calling execute reader. Are you using this option and then also closing the connection in code before the datareader object is closed, if so you may be hitting this bug. You can also generate an ODP trace at level 15 of the behavior and if you see negative pool counts, that is also a diagnostic that points to this bug.
    This is fixed in 11.2.0.1.0 Patch 3 or later for x64. If you have support, I recommend you open a service request to verify if this is your issue and if a patch set may help you.
    Regards
    Jenny B.

  • Oracle.DataAccess.Client.OpsSql::ExecuteReader() never returns

    Within a single day I have experienced twice a peculiar problem with Oracle.DataAccess.Client.OpsSql::ExecuteReader()
    Calling ExecuteReader() blocks indefinitely on a simple select query (it was a different query the two times). The CPU of the Oracle Server was low, so it is not likely that it has been too busy (and moreover at least 10 minutes passed, and it was still blocked)
    Strangely in v$session there was no session entry for the particular process+thread that made the call. There was an inactive session from the same process, but different thread
    My guess is that somehow the Oracle executed the query, but the Oracle Client was not notified and remained waiting. The issue happened on a virtual machine with not stable network connection. Could it be that some packets were lost and the Oracle Client just kept waiting?
    Can anybody recommend a course of action?
    Btw, I use ODP.NET 2.111.6.20

    I use VPN all day every day, and havent seen that problem.
    A client sqlnet trace may help as well, and I'm guessing will show the client is waiting on a packet from the db.
    You may want to take a hang dump using ADPlus, and my guess is you'll see a socket stuck in WSA_Recv32 (waiting for a packet that never comes).
    The default time to wait for a packet is like 2 hours if I remember right.
    You may want to see if your network guys can have a look, or use a tool like WireShark to monitor packets.
    Hope it helps, sorry I dont have a quick easy answer for you.
    Greg

  • Oracle.DataAccess

    Hi,
    My application uses ODP.net to connect to Oracle and can run successfully within Visual Studio 2005 , but if I copied .exe to another folder (outside MS Visual Studio) then I got the error:
    Could not load file or assembly 'Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    There are two entries in my references, I pointed to Oracle.DataAccess 2.102.2.20 (the one in ODP.net)
    Oracle.DataAccess 10.2.0.100 V1.0.3705 c:\oracle\product\db_1\bin\Oracle.DataAccess.dll
    Oracle.DataAccess 2.102.2.20 V2.0.50727 c:\oracle\product\client_1\odp.net
    bin\2.x\Oracle.DataAccess.dll
    Anyone can help?
    Thanks
    Liz

    Hi,
    Oracle's ODP.net is client version specific, so 10.2 Oracle.DataAccess.dll requires the corresponding version of OraOps10(w).dll which comes with Oracle.DataAccess.dll, as well as a 10.2 client.
    You can not distribute the 10.x Oracle.DataAccess.dll and expect it to work on a 9.x client.
    If you know your users will have SOME version of ODP and Oracle client installed, you'd have to compile your app with the lowest version of ODP (9.2) in order for it to work on all installs.
    We didnt have an ODP in 8.x, so that's right out.
    Instant client is still an Oracle client, its just in a different form. The 11.1.6.20 odp comes with instant client so you dont need to download it seperately, but as far as getting a better understanding of what it is please see the following:
    http://www.oracle.com/technology/tech/oci/instantclient/index.html
    Just fyi, System.Data.OracleClient (Microsoft's ODP for Oracle) that comes with the .NET framework is not tied to any particular version of Oracle client, so could be used with any version of client install. It doesnt have as much cool stuff as Oracle's ODP does though.
    Hope it helps,
    Greg

  • Issues with different versions of Oracle.DataAccess.dll

    I have a .net web service application which references version 10.2.0.100 of Oracle.DataAccess.dll. A client has setup Oracle 10g database on the server, but I think the server has a patch set installed so it appears that the versions of Oracle.DataAccess.dll in my web service and on the database server do not match. When I issue a query via the web service on my local machine using my oracle 10g client, the web method returns the correct data. If I issue the same query using the same .net web service on the clients database server, I get the following error: Oracle.DataAccess.Client.OracleException: ORA-00923: FROM keyword not found where expected. There's nothing wrong with the query syntax, I can run the same query from SQL Plus on the database server and get the correct data. Could it be a compatibility issue between the Oracle.DataAccess.dll referenced in my web service application and the file on the sever. I'm not sure what else to look for, any advice is greatly appreciate, and I can answer any questions if needed.
    Thanks,
    NA

    I would not expect an ORA-923 if your the Oracle client was not installed properly. I would expect an exception or a crash.
    You can run an ODP.NET trace to find out what query is getting the ORA-923 by doing the following:
    1) Shutdown web server on the machine that runs the webservice (middle tier),
    2) In windows registry, on the machine that runs the webservice (middle tier), change registry value \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET\4.112.1.1\TraceLevel to 1
    3) Reproduce the ORA-923 only
    4) shutdown webserver
    5) Undo the registry value (set it back to 0)
    6) In the generated file (c:\odpnet2.0.trc) do a search for "923", hopefully you can find it. Just before that error, you should see the SQL that was executed. This will obviously not be what you expect and will hopefully point you to the cause of the problem.

  • Oracle.DataAccess 32bit and x64 with one build? no matching version exists?

    We have used Oracle.DataAccess to build a .net assembly. version was 10.1.0.400. I can't seem to find the native x64 install for this version 10.1.0.400 We are running IIS in the 64 bit mode. so I need a native x64 bit assembly.
    We are deploying our .net assembly to both a 32 bit and x64 bit machines. so I need to install some version of Oracle.DataAccess with the same version in both 32 bit and x64 bit.
    I can't seem to find a version in common to both 32 bit and x64 bit.
    it looks like the closest I can get is 2.102.3.2 for x64 and 2.102.2.20
    I have no problem re-building the assembly and as long as I can get the same version installed on both 32 bit and x64 bit in the GAC it should run just fine. help where can I find a matching 32 bit and x64 bit version to install?

    Hi,
    Yes, you have to have a support account to be able to log in to metalink and get the patches.
    Part of the ODP.NET install includes installing policy files in the GAC that redirect usage to the latest version installed, so I'd think you should be fine compiling on 10.2.0.2.21 x86 (for example) and distributing to 10.2.0.3.02 x64. You'd have to compile with a version <= the version you want to be able to run it on though.
    Greg

  • How to change assembely reference to Oracle.DataAccess in prod

    Ok -
    In development I installed "ODAC Entity Framework and LINQ Beta (11.2.0.2.30)" so that we could have a 32 bit version of Oracle.DataAccess for ODP.Net.
    In Visual Studio 2010 (on Windows Server 2008 R2) I made a reference to:
    C:\Oracle\odp.net\bin\4\Oracle.DataAccess.dll.
    This adds:
    <add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" />
    to the assembly in the web.config.
    We set the AppPool to Enable 32 bit applications and everything works great.
    For anyone who doesn't know the story here, we do this because Visual Studio 2010 runs in 32 bit so you need the 32 bit ODAC/ODP.net components to get a development environment running.
    I then publish the files and move to a 64 bit machine.
    I downloaded the "ODAC112021Xcopy_x64.zip"
    Then ran:
    install.bat odp.net4 c:\oracle odac and I can see the Oracle.DataAccess.dll file at:
    C:\Oracle\odp.net\bin\4\Oracle.DataAccess.dll.
    Then added c:\oracle;c:\oracle\bin\;c:\oracle\bin\4 to the System Path.
    At this point I would think I just replace the version and PulbicKeyToken in:
    <add assembly="Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89B483F429C47342" />
    on production to the versioin installed on prod.
    So first thing I do is just remove that line on production to see what error I will get.
    And I still get the same error:
    System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    Actually this is if I move the new dll into the applicaitons bin directory.
    If I remove the dll from the directory I get:
    Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    So I put the line back in.
    I right click on on the new Oracle.DataAccess.dll and click properties.
    In the details tab I see verion is 4.112.2.0.
    That makes sense. The 64 bit XCopy version is an earlier build then the 32 bit Beta that comes with Entity Framework and LINQ(Version=4.112.2.30).
    So on production I change the Version attribute to: 4.112.2.0.
    But now I get the same error:
    System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.30, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    (This is with the new dll back in the web app's bin directory as is the rest of the thread).
    It's still looking for the same version of the assembly. Why is it doing that?
    The web.config has a connection string with the ODP.Net provider type (Oracle.DataAccess.Client).
    Which would take from the assembly reference.
    It should not care what the version number is.
    Could there be something in code somewhere that is specifically looking for the old dev box version?
    Just what is the way to make it use the new assembly?
    I would think the system would just know where to find the new dll.
    Just as in development the add reference dialog knew that the dll was in c:\oracle\... rather then c:\program files(x86)... like out-of-the-box Microsoft assemblies. Because the system knows, right?
    Edited by: 842453 on Mar 7, 2011 1:17 PM

    Hi,
    The .NET runtime will always attempt to load the exact version of the ODP assembly that the application was compiled with unless you have some sort of binding redirection in place. We do provide forward redirection in the way of publisher policy files but we do not provide backward redirect, you would have to add this binding redirect to your app.config file. We generally do not recommend you redirect to use an older version although I dotn see any real reason why it shudl not work as long as you are not using any 4.112.3.0 specific features. Loading the assembly that the application was compiled with is a security thing and is the way it works.
    The only thing you are doing by adding that reference to the configuration file for 4.112.2.0 is to have that preloaded by the runtime, your application is still compiled with 4.112.3.0 and expects to find that exact version unless you tell it otherwise because we only provide forward redirection when ODP gets installed.
    HTH
    Jenny

  • Unable to load Oracle.DataAccess

    Hi ,
    I have created a website project on .net framework 4.0 in Visual Studio 2010 . But I am unable to add reference the Oracle.DataAccess dll. It is continously throwing the error " unable to load assembly Oracle.DataAccess . The system cannot find the file specified. "
    But when I tried adding the reference in a web application project , it gets added. But when run the project it is throwing the same error. On the web page the error thrown is this :
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess' could not be loaded.
    === Pre-bind state information ===
    LOG: User =***********
    LOG: DisplayName = Oracle.DataAccess
    (Partial)
    WRN: Partial binding information was supplied for an assembly:
    WRN: Assembly Name: Oracle.DataAccess | Domain ID: 2
    WRN: A partial bind occurs when only part of the assembly display name is provided.
    WRN: This might result in the binder loading an incorrect assembly.
    WRN: It is recommended to provide a fully specified textual identity for the assembly,
    WRN: that consists of the simple name, version, culture, and public key token.
    Stack Trace:
    [BadImageFormatException: 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.]
    System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
    System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
    System.Reflection.Assembly.Load(String assemblyString) +28
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
    Any help on this , please.. I have been trying all sorts of things and nothing seems to workl.

    BadImageFormatException occurs when you have a bit mismatch.
    1) What is the TargetCPU set to when you compiled?
    2) Are you running the app on 32 bit or 64 bit OS?
    3) Confirm whether the app is running as 32 bit or 64 bit in the problem environment (open task manager, click the process tab, is there a *32 next to the name?)
    4) Did you install 32 bit Oracle client or 64 bit Oracle client?
    Cheers,
    Greg

  • Help with Oracle Connection- "Input string was not in a correct format"

    Hello, can some one, anyone please help me. I have a simple VS 2005 C# application that connects to oracle. I've set it up to take the username, password and tnsname as arguments. I am using Client 9i, version 9.2.0.401 of Oracle.DataAccess.dll, and .NET Framework 2.0.
    It works fine when I run it from VS 2005, I have also set up a test machine w/o VS 2005 and ran my install package and it runs fine. I sent it to one of my co-workers and when he tries it the OracleConnection obect fails with the error.
    "Input string was not in a correct format"
    strange in that it is not an ORA error, just the identifed text!?
    Here is the code:
    ## begin code
    OracleConnection dbc = new OracleConnection();
    string sConnectString = "User Id=" + username.ToString() + ";Password=" + password.ToString() + ";Data Source=" + tnsname.ToString();
    dbc.ConnectionString = sConnectString.ToString();
    MessageBox.Show("Attempting to Connect to Oracle");
    dbc.Open();
    MessageBox.Show("Connected to Oracle: " + dbc.ServerVersion);
    ## end code
    Pretty basic, what could be going on?
    Since this only happens with an installation, I put in the message boxes to verify exactly where it chokes. I get the first message box, then an error with the identified text. I've seen a number of posts regarding input string format problems, but not a one dealing with OracleConnection.Open(). I added all the ToString() calls just to make sure everything was a string but it did not change the end result.
    Anyone? Thanks In advance!
    Eric S.

    Hello,
    well, i got a message "...string not wellformed format...", too.
    If you have defined the parameters as string, you don't need the additonal "ToString()". Please ckeck your tnsnames -string. Try to debug this. I believe you have copy the format from the tnsnames.ora and there you have much brackets.
    For example, two code snippets:
    As datasource i use <Server>:<Port>/<Instance>
    try
    string FDsn ="User Id="+FDbUser+";Password="+FDbPwd;
    FDsn +=";Data Source=wth5:1521/Ora9.wth5";
    FConn = new OracleConnection(FDsn);
    FConn.Open();
    if (FConn.State == ConnectionState.Open )
         FConn.Close();
    catch (Exception ex)
         FStateMsg = "Connection to database failed. Check Configuration in parameter: ConnectionString. " + ex.Message;
    Above i connect to a Ora 9.2.0.1
    by using
    FDsn +=";Data Source=wth5:1522/XE";
    i connect to an OraExpress database on the same machine.
    My Oracle.dataAccess.dll ist the newest, 10.2.... and it runs under Framework 1.1.x and Framework 2.x
    I'll hope it will help you. Best regards!

  • Parser Error Message: Could not load file or assembly 'Oracle.DataAccess, V

    I'm working on a 64 bit windows 7 ultimate system and I can't get the Oracle.DataAccess and Oracle.Web to load on the helloworld web page
    See error below. At the very end i have the gacutil output. Also, the same dll's work on a 32 bit windows 7 system. I've also tried to load the beta version of the odac 64 bit
    but it it gets a "java stopped working error"
    Thanks in advance
    WEB PAGE ERRORVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
    Server Error in '/test/helloworld' Application.
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    Parser Error Message: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Source Error:
    Line 37:                     <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    Line 38:                     <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    Line 39:                     <add assembly="Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
    Line 40:                     <add assembly="Oracle.Web, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89B483F429C47342"/></assemblies>
    Line 41:           </compilation>
    Source File: C:\inetpub\wwwroot\test\helloworld\web.config Line: 39
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.
    === Pre-bind state information ===
    LOG: User = IIS APPPOOL\DefaultAppPool
    LOG: DisplayName = Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342
    (Fully-specified)
    LOG: Appbase = file:///C:/inetpub/wwwroot/test/helloworld/
    LOG: Initial PrivatePath = C:\inetpub\wwwroot\test\helloworld\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\inetpub\wwwroot\test\helloworld\web.config
    LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
    LOG: Post-policy reference: Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f429c47342
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess/Oracle.DataAccess.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess.EXE.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/test_helloworld/480589f5/895d06ab/Oracle.DataAccess/Oracle.DataAccess.EXE.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess.EXE.
    LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/test/helloworld/bin/Oracle.DataAccess/Oracle.DataAccess.EXE.
    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
    gacuil output
    VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
    C:\Users\Administrator>C:\"Program Files"\"Microsoft SDKs"\Windows\v6.0A\Bin\x64
    \gacutil.exe /l Oracle.DataAccess
    Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
    Copyright (c) Microsoft Corporation. All rights reserved.
    The Global Assembly Cache contains the following assemblies:
    Oracle.DataAccess, Version=2.112.1.1, Culture=neutral, PublicKeyToken=89b483f4
    29c47342, processorArchitecture=x86
    Edited by: burk_s on Jun 6, 2010 2:42 PM

    Hi Mubarak,
    Please firstly make sure you installed SharePoint Foundation 2010 with SP2 in a Windows Server 2012 R2. Since only SP2 slipstream installations are supported on Windows Server 2012 R2
    http://blogs.technet.com/b/stefan_gossner/archive/2014/05/03/sharepoint-2010-sp2-and-windows-server-2012-r2.aspx
    http://blogs.technet.com/b/stefan_gossner/archive/2013/09/19/slipstream-version-of-sharepoint-foundation-2010-with-sp2-included.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Oracle.DataAccess.dll on Windows 7 64 bit

    Hi,
    I am migrating a .Net 3.5 windows class library from WinXP 32 bit to Win7 64 bit. I use Oracle 11g 64 bit client to connect to database.
    my code works in Debug build but not in Release build. here is the error message:
    "An attempt was made to load an assembly with an incorrect format:"
    I did not complete uninstall by Oracle Deinstall, and re-install it.
    Debug build have a waring:
    "Assembly generation -- Referenced assembly 'Oracle.DataAccess.dll' targets a different processor."
    Release build still the same incorrect format error.
    here is more information:
    under C:\Windows\assembly
    Oracle.DataAccess     2.112.1.0     89b483f429c47342     AMD64
    Oracle.Web          2.112.1.0     89b483f429c47342     AMD64
    How should I fix it? should I download and install "64-bit Oracle Data Access Components (ODAC)"? What's difference between ODP.net in Oracle client and in ODAC?
    Thank you,
    Wes
    Windows 7 Pro, 64 bit, Visual Studio 2010, Oracle 11g 64 bit client

    What do you have /32BIT flag set to in the assembly? Ie, was it compiled with AnyCPU, x86, etc? You can use corflags.exe with the .net sdk to find out.
    Prior to VS2010, the default was AnyCPU which meant it ran as 64 bit on 64 bit OS, and 32 bit on 32 bit OS.
    As of VS2010, the IDE defaults to x86, which means it runs as 32 bit no matter what.
    32 bit apps need 32 bit odp/client. 64 bit apps need 64 bit odp/client.
    The error you're getting usually means you have the wrong bits (32/64) of the Oracle client installed.
    Assuming you have the wrong client bits installed, you could either
    a) make the app run as the other bits by setting/clearing the 32BIT flag (also by using corflags.exe)
    b) install the other bits of Oracle client software. a 32 bit home and a 64 bit home play rather nicely together for the most part, but you need to install them into separate homes.
    Hope it helps,
    Greg

  • Could not load file or assembly 'Oracle.DataAccess error on server

    I have been building a.NET application on my local Machine Windows 7 and have the 32-bit ODT installed on my machine which works nicely with VS 2010.
    I placed it on the server and when I open the page that accesses data from Oracle, I get the below error. Both the server and my local computer have the Oracle.DataAccess
    dll installed and both have the same public token 89b483f429c47342. I changed the target CPU from Any CPU to x86 and published a Release build of my project to the server.
    Why am I getting the below error?
    ==========================================================================================================
    Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    Stack Trace:
    [FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.]
    antac.dashboard.Page_Load(Object sender, EventArgs e) in C:\Users\George\Documents\Visual Studio 2010\Projects\antac\antac\dashboard.aspx.cs:92
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    This was definitely the right answer, I thought ODAC was already installed on the server, but apparently not. I installed the 64-bit OCAC XCopy version on the server and now it works.

Maybe you are looking for