1 2 3 Previous Next 33 Replies Latest reply: Jul 18, 2010 5:45 AM by 785744 RSS

    ODP.Net VS2008 on 64bit Vista

    664220
      I have 64bit Vista and Visual Studio 2008 and I am trying to get the client tools to work. Originally I had 10g (32bit), on top of which I tried to install the 11g ODP. When I would try to create a database server connection in VS with the Oracle Data Provider, the connection would test out OK but when I proceed to create it, I would get an error message stating:

      Unable to find the requested .Net Framework Data Provider. It may not be installed.

      I installed a variety of combination of 11g and 10g 32bit and 64bit client tools and ODPs without much success. When I followed the success path from:

      Java(TM) 2 Platform Standard Edition binary has stopped working

      My Java runtime would crash when trying to install the 10g ODP so I could not test it out.

      Last, I uninstalled everything and installed the 11g client. Then, when I tried to install the 11g ODP, it would not let me put it in the same base directory as the client so I chose a different folder. After installing I am still getting the above message in VS.Net when I try to create a database connection. I checked the GAC and I have the following Oracle related DLLs:

      Oracle.DataAccess 1.111.6.20
      Oracle.DataAccess 1.111.6.0
      Oracle.DataAccess 2.111.6.20 x86
      Oracle.DataAccess 2.111.6.0 x86
      Oracle.DataAccess 2.102.2.20 x86
      Oracle.Management.Omo 2.111.6.20 x86
      Oracle.VsDevTools 2.111.6.20 x86
      Oracle.Web 2.111.6.20 x86

      C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config - has NO reference to the Oracle.DataAcess.Client provider, just the .Net one
      C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config - has reference to the Oracle.DataAcess.Client provider:

      <configSections>
      <section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      ...
      <DbProviderFactories>
      <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.111.6.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
      ...

      I understand that VS 2008 is a 32bit process and can only interact with 32bit components in the GUI. Why is then the 32bit version of .Net not properly configured? I adding the same configuration lines to the 32bit config and... tah dah... it worked. I created connection, datasets and compiled from there on without a problem.

      The question is - why did it have to be so complicated? Did I miss a step in the installation? Has anybody else done this before and made it work?

      Note that prior to hacking my way through the machine.config, I tried using the nice little util OraProvOfg in the odp.net\bin\2.x folder but I kept getting:

      Error: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

      Even though my path was properly set up to the bin of the installed client AND to the bin of the instal odac.
        • 1. Re: ODP.Net VS2008 on 64bit Vista
          24208
          Hello,

          Not sure how helpful it will be, but since you asked, I installed ODT with ODAC 11.1.0.6.21 with no issues on a Vista 64 machine. Is that the same version you were using?

          Regards,

          Mark
          • 2. Re: ODP.Net VS2008 on 64bit Vista
            533666
            Many thanks for your post on the issues with Vista 64 and ODTWithODAC11.

            I had similar issues with not being able to create a connection from within VS2008 and I'm posting this to alert Oracle that others are experiencing the same issue.

            Adding the two entries to machine.config resolved the problem.
            • 3. Re: ODP.Net VS2008 on 64bit Vista
              316280
              I've tried to install ODT 11.1.06.21 today (ODTwithODAC1110621) on my Vista x64. I have no other Oracle components installed at all since this is fresh Vista install. To my surprise VS 2008 SP1 was failing to connect to my Oracle database (via VS server explorer) with the error mentioned in the original post.
              I followed the solution provided in it but with no success. So, I decided to check it myself.

              First of all I checked ODT/ODAC installation logs and they contain this strange error:
              Error: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
              Same error appears when you try to run OraProvCfg on its own.

              IMHO: this could only happen when Oracle.DataAccess is incompatible with OraProvCfg tool. I checked GAC and it appears that Oracle.DataAccess has x86 processor architecture but OraProvCfg is MSIL assembly with no CPU flag set (i.e. Any CPU). At run-time OraProvCfg is launched with x64 version of .NET 2.0. You can check this by enabling Fusion log in registry. As my log is in Russian I'll put only a few lines here:
              *...*
              *...hr = 0x80131047*
              *C:\Windows\Microsoft.NET\{color:#ff0000}Framework64{color}\v2.0.50727\mscorwks.dll*
              *...*
              *DisplayName = Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342, {color:#ff0000}processorArchitecture=x86{color}*
              *...*

              Next thing was to force x86 execution for the OraProvCfg tool which can be done by running Windows SDK tool:
              CorFlags.exe /32BIT+ C:\app\product\11.1.0\client_1\odp.net\bin\2.x\OraProvCfg.exe /Force
              (On my desktop it is located at C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\)

              After that running OraProvCfg with the below parameters works perfectly:
              OraProvCfg.exe /action:config  /product:odp  /frameworkversion:v2.0.50727 /providerpath:"C:\app\product\11.1.0\client_1\odp.net\bin\2.x\Oracle.DataAccess.dll"

              C:\...\11.1.0\client_1\odp.net\bin\2.x&gt;1\odp.net\bin\2.x\Oracle.DataAccess.dll"
              INFO: The following section has been added.
              +&lt;section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConf+
              +igurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=+
              +b77a5c561934e089" /&gt;+



              INFO: The following element added under DbProviderFactories.
              +&lt;add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" d+
              escription="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.Oracle
              ClientFactory, Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKey
              Token=89b483f429c47342" /&gt;


              Finally, I am able to create (and save) Oracle DB connections via Server Explorer tool in VS.
              The more interesting thing is that entries added to my machine.config file are the same as mentioned in your solution :) It may be I am blind and I spent couple of hours double checking things before falling into my "deep" investigation.

              Regards,
              Ivan.
              • 4. Re: ODP.Net VS2008 on 64bit Vista
                642637
                Awesome...Many thanks! browsed multiple forums suggesting issues with Machine.config, but your solution was the only one that worked with my 64bit Vista w/ VS2005.

                cheers!
                • 5. Re: ODP.Net VS2008 on 64bit Vista
                  681099
                  Hi:

                  I've tried all of this and I still can't get it to work.

                  I've installed the 11g 32bit and 64bit client, and the tools for Visual Studio.

                  I'm using Vista Business 64bit, Visual Studio 2008 and the 11g versions of the client software. I couldn't install the 64bit version of the ODP.net as the installer would crash on execution.

                  I can test connections in VS2008 successfully, but whenever I try to create the database references (by hitting OK), it fires the error message "Unable to find the requested .Net Framework Data Provider. it may not be installed."

                  The same thing happens if I use the ODBC or OLE DB interfaces as well.

                  I'm pretty much at wits end here, so if anyone can help I'd greatly appreciate it.
                  • 6. Re: ODP.Net VS2008 on 64bit Vista
                    681284
                    I'm having the same issues as jnikaido, whenever I launch the ODP .NET x64 installer I get a java crash error.

                    I am using Vista Enterprise 64bit and the OS install is 2 days old (new laptop, formatted pre-install and installed from scratch).

                    I went as far as to try replacing the bundled version (1.5) of the 64 bit JRE to the latest version of the JRE with no luck.

                    If anybody has gotten this to install, would love to know how you did it. Thanks in advance for any help or any ideas.
                    • 7. Re: ODP.Net VS2008 on 64bit Vista
                      684280
                      I have problem with Oracle 11g ODAC 11.1.0.6.21 on windows 2008 (x64) machine. The installation has no error but I don't see any entry for Oracle.DataAccess machine.config in both Framework and Framework64. Does anyone know why?

                      I don't see Oracle.DataAccess in GAC. I manually added them. It doesn't help. When I run my asp.net application I got error like

                      Parser Error Message: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

                      Source Error:


                      Line 33:                     <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                      Line 34:                     <add assembly="Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                      Line 35:                     <add assembly="Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89B483F429C47342"/></assemblies></compilation>
                      Line 36:           <!--
                      Line 37: The <authentication> section enables configuration


                      Source File: E:\mySite\web.config Line: 35

                      Assembly Load Trace: The following information can be helpful to determine why the assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.


                      Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
                      Running under executable c:\windows\system32\inetsrv\w3wp.exe
                      --- A detailed error log follows.

                      === Pre-bind state information ===
                      LOG: User = NT AUTHORITY\NETWORK SERVICE
                      LOG: DisplayName = Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342
                      (Fully-specified)
                      LOG: Appbase = file:///E:/mySite/
                      LOG: Initial PrivatePath = E:\mySite\bin
                      Calling assembly : (Unknown).
                      ===
                      LOG: This bind starts in default load context.
                      LOG: Using application configuration file: E:\mySite\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.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342
                      LOG: Attempting download of new URL file:///e:/TempASPNETFiles/mysite/2ec9b222/52d0b524/Oracle.DataAccess.DLL.
                      LOG: Attempting download of new URL file:///e:/TempASPNETFiles/mysite/2ec9b222/52d0b524/Oracle.DataAccess/Oracle.DataAccess.DLL.
                      LOG: Attempting download of new URL file:///E:/mySite/bin/Oracle.DataAccess.DLL.
                      LOG: Attempting download of new URL file:///E:/mySite/bin/Oracle.DataAccess/Oracle.DataAccess.DLL.
                      LOG: Attempting download of new URL file:///e:/TempASPNETFiles/mysite/2ec9b222/52d0b524/Oracle.DataAccess.EXE.
                      LOG: Attempting download of new URL file:///e:/TempASPNETFiles/mysite/2ec9b222/52d0b524/Oracle.DataAccess/Oracle.DataAccess.EXE.
                      LOG: Attempting download of new URL file:///E:/mySite/bin/Oracle.DataAccess.EXE.
                      LOG: Attempting download of new URL file:///E:/mySite/bin/Oracle.DataAccess/Oracle.DataAccess.EXE.
                      • 8. Re: ODP.Net VS2008 on 64bit Vista
                        gdarling - oracle
                        jnikaido, user5751391 , if you're having issues installing 10g 64 bit software, you need to use [10204_vista_w2k8_x64_production_client.zip|http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10204_winx64_vista_win2k8.html] to install 10g to x64 vista, which has the 10202.20 ODAC functionality built in.


                        jingmeiliu, if you installed ODAC 11.1.0.6.21, then you've installed 32 bit software. Your ASP.NET app is using 64 bit framework, judging by the "C:\Windows\Microsoft.NET\*Framework64*\v2.0.50727\" in the stack. You'll need 64 bit Oracle client install to run a 64 bit app.

                        To install 11g x64 ODP with the 11g odac functionality, you'd install 11.1.0.6 x64 client, then apply the 11.1.0.7 RDBMS patch to it (there's currently no separate 11g odac x64 downloadable bundle).

                        Hope it helps,
                        Greg
                        • 9. Re: ODP.Net VS2008 on 64bit Vista
                          684280
                          Greg,

                          Thank you for your reply. I try to understand this. I should remove existing ODAC 11.1.0.6.21. Then I need first to install 11.1.0.6 x64 client then 11.1.0.7 RDBMS patch. Which ODP version shall I use? I found ODAC 10g (64bit) and ODAC 11.1.0.6.21. Also I didn't find where to download RDBMS 11.1.0.7.

                          JL
                          • 10. Re: ODP.Net VS2008 on 64bit Vista
                            gdarling - oracle
                            Hi,

                            You can remove the 32 bit software or not. It's likely not hurting anything, its just not what you need for the 64 bit app.

                            I'd recommend using 11g ODP over 10.2.

                            To get 11g x64 ODP with UDT support, you need to install 11106 client then apply 11107 rdbms patch to it. The 11107 RDBMS patch is on Metalink as patch number 6890831 . It's just a patch, not a full download. You need to apply it on top of the 11106 client install.
                            Aternatively, if you just want 11g ODP without the new functionality in 11g odac, you can just still 11106 client, without applying 11107 patch.

                            Hope it helps,
                            Greg
                            • 11. Re: ODP.Net VS2008 on 64bit Vista
                              684280
                              Hi Greg,

                              UDT support is what I have to have. So I need the patch. Does Oracle Database 11g Release 1 Client (11.1.0.6.0)
                              for Microsoft Windows (x64) include ODP.net (w/o UDT support)?


                              Thanks

                              JL
                              • 12. Re: ODP.Net VS2008 on 64bit Vista
                                gdarling - oracle
                                It does.
                                • 13. Re: ODP.Net VS2008 on 64bit Vista
                                  684280
                                  Hi Greg,

                                  RDBMS 11.1.0.7 is a patch set for server 1.4 GB. Is there a seperated patch that just for client?

                                  Thanks.

                                  JL
                                  • 14. Re: ODP.Net VS2008 on 64bit Vista
                                    gdarling - oracle
                                    Unfortunately there is no separate patch for the client :(
                                    greg
                                    1 2 3 Previous Next