ODP.Net provider error
-
Hello, I downloaded and installed the ODAC for 64 bit machine. There were no issues installing, except that you have a to execute a sql file at the end of installation. It is located at c:\app\\product\11.2.0\client\Asp.net\SQL - Where would I execute this? From DOS prompt? I added the Oracle.DataAccess.dll to VS 2010. I keep getting this error - Error 2 Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. C:\projects\CSCC-DotNet\Web.config 14 any ideas? I did search the web, but with no luck. Thanks!
-
Hello, I downloaded and installed the ODAC for 64 bit machine. There were no issues installing, except that you have a to execute a sql file at the end of installation. It is located at c:\app\\product\11.2.0\client\Asp.net\SQL - Where would I execute this? From DOS prompt? I added the Oracle.DataAccess.dll to VS 2010. I keep getting this error - Error 2 Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. C:\projects\CSCC-DotNet\Web.config 14 any ideas? I did search the web, but with no luck. Thanks!
It is telling you it can't find the DLL. On line 14 in your web.config, you're referencing a DLL, and for some reason the runtime system can't find it. Either the assembly is not in the GAC, or the path you specified is wrong. In my Web.config the tag looks like this:
<add assembly="Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
Which suggests the assembly is found in the GAC - which is where the installer should have placed it. This has nothing to do with the SQL scripts, which have probably already been run on your server - they only need to be run once for each server, so if you're the second or later developer to install this, you can skip it. One way to "reset" VS in terms of finding this assembly is to go into your project property pages, open the "references" and remove the Oracle.DataAccess reference. Then save your project, I usually restart VS, then right-click the bin, choose "Add Reference..." and add the Oracle DLL back in. That should help it find the thing correctly. If that doesn't work, drop a copy of the Oracle.DataAccess.DLL into the bin.
-
It is telling you it can't find the DLL. On line 14 in your web.config, you're referencing a DLL, and for some reason the runtime system can't find it. Either the assembly is not in the GAC, or the path you specified is wrong. In my Web.config the tag looks like this:
<add assembly="Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
Which suggests the assembly is found in the GAC - which is where the installer should have placed it. This has nothing to do with the SQL scripts, which have probably already been run on your server - they only need to be run once for each server, so if you're the second or later developer to install this, you can skip it. One way to "reset" VS in terms of finding this assembly is to go into your project property pages, open the "references" and remove the Oracle.DataAccess reference. Then save your project, I usually restart VS, then right-click the bin, choose "Add Reference..." and add the Oracle DLL back in. That should help it find the thing correctly. If that doesn't work, drop a copy of the Oracle.DataAccess.DLL into the bin.
When I installed the ODAC componenets for .Net, there was a folder created, in addition to adding the dll to GAC, C:\app\\product\11.2.0\client_1\odp.net\bin\4\ORacle.DataAccess.dll. I am using this reference in my web site. Maybe this is the problem. How can I un-reference this one and add this one - C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.3.0__89b483f429c47342\ORacle.DataAccess.dll?? In m web.config file, there is the same listing
Thanks so much for your help!!
-
When I installed the ODAC componenets for .Net, there was a folder created, in addition to adding the dll to GAC, C:\app\\product\11.2.0\client_1\odp.net\bin\4\ORacle.DataAccess.dll. I am using this reference in my web site. Maybe this is the problem. How can I un-reference this one and add this one - C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.3.0__89b483f429c47342\ORacle.DataAccess.dll?? In m web.config file, there is the same listing
Thanks so much for your help!!
I think you can do the swap with the references window in your project properties. I just checked my site, and I'm using the "DLL in the bin folder" method. I don't remember why, but I think it's because the locations are different in the server.