I am using ASP.NET(C#) and Oracle. Oracle is installed in a remote system, I am accessing it via Oracle Instant Client. It works fine when I am runnig it via VWD 2005 at development time. But while I am runnig my application in my local IIS then it is giving
me following exception message:
Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
Provider is unable to function until these components are installed.
It's still not working. I am using OLEDB for database connectivity and I am connecting database via a .CS file(not with Web.conf connection string), my connection string is:
You can try this:look for multiple copies of the OCIW32.dll file on the IIS server. There should only be one copy of this .dll file on the computer, and it should be in the \Bin subfolder of the Oracle home folder. If you find other copies, rename these
with a .bak extension and then retest connectivity. You may want to restart the IIS services after renaming any additional copies of the .dll file that you found.
2. I don't have any other copy of OCIW32.dll except in Instant_client Folder.
3. As mentioned in 10th point of the given link i dont have SQLNET.ora file.................?
4. I don't have any \Bin folder in my Instant_client folder, It has only a single folder instantclient_11_1.. It contains 2 more folders and some files, including OCIW32.dll.
if you are using oracle instant client , you dont have oracle connection configuration files available.
you have to use the entire tnsnames block on your connection string.
mishra.bhupe...
Participant
1598 Points
378 Posts
Connect To DataBase;
Apr 25, 2012 07:56 AM|LINK
I am using ASP.NET(C#) and Oracle. Oracle is installed in a remote system, I am accessing it via Oracle Instant Client. It works fine when I am runnig it via VWD 2005 at development time. But while I am runnig my application in my local IIS then it is giving me following exception message:
Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed.
how to solve this proble? Please.
somnathmali
Contributor
2816 Points
450 Posts
Re: Connect To DataBase;
Apr 25, 2012 08:04 AM|LINK
1. ensure you have installed Oracle .NET connector.
2. check that oracle confinuration files are proper in connector's folder (...client_1\Network\Admin)
.NET Developer , Pune INDIA.
Please Mark As Answer If my reply helped you.
necro_mancer
Star
8017 Points
1574 Posts
Re: Connect To DataBase;
Apr 26, 2012 04:27 AM|LINK
you need to download the Oracle connector from http://www.oracle.com/technetwork/middleware/id-mgmt/downloads/connectors-101674.html
Please mark this response as an "answer" if it helps you. Thanks heaps!
Professional SQL 2008 R2 Service
mishra.bhupe...
Participant
1598 Points
378 Posts
Re: Connect To DataBase;
Apr 26, 2012 06:07 AM|LINK
It's still not working. I am using OLEDB for database connectivity and I am connecting database via a .CS file(not with Web.conf connection string), my connection string is:
"Provider=MSDAORA.1;Data Source=there;Password=here;User ID=here";
It's not connectig to database on IIS but works fine while runnig with Visula Web Developer IDE.
Is there any other way to connect to database?? My database is on a remote system and I am accessing it vial Oracle Instant Client.
Thank a lot.
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Connect To DataBase;
Apr 27, 2012 04:57 AM|LINK
Hi
It's a common issue.
You can try this:look for multiple copies of the OCIW32.dll file on the IIS server. There should only be one copy of this .dll file on the computer, and it should be in the \Bin subfolder of the Oracle home folder. If you find other copies, rename these with a .bak extension and then retest connectivity. You may want to restart the IIS services after renaming any additional copies of the .dll file that you found.
More details:
http://support.microsoft.com/kb/255084
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
mishra.bhupe...
Participant
1598 Points
378 Posts
Re: Connect To DataBase;
Apr 27, 2012 07:38 AM|LINK
I have deleted all files named ociw32.dll by searching in mycomputer.Now It gives same error in both cases runnig with VWD and IIS.
When I restored ociw32.dll file in oracle instant_client folder , It works fine with VWD but not with IIS and give sam error message:
As in link give by Dino He - MSFT I checked:
1. My SQL*PLus is working fine.
2. I don't have any other copy of OCIW32.dll except in Instant_client Folder.
3. As mentioned in 10th point of the given link i dont have SQLNET.ora file.................?
4. I don't have any \Bin folder in my Instant_client folder, It has only a single folder instantclient_11_1.. It contains 2 more folders and some files, including OCIW32.dll.
Thanks a lot for taking interest.
Dino He - MS...
Star
8068 Points
1023 Posts
Microsoft
Re: Connect To DataBase;
May 02, 2012 07:32 AM|LINK
Hi
I think you should change some setting in your IIS,
In your application pools chang advanced settings->process model to Networkservice may make sence.
If you still can't work, You can post your thread to IIS forum.
I belive your will get the right setting for your IIS there.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
ruipedromach...
Member
258 Points
84 Posts
Re: Connect To DataBase;
May 02, 2012 07:37 AM|LINK
hi
if you are using oracle instant client , you dont have oracle connection configuration files available.
you have to use the entire tnsnames block on your connection string.
try
using system.data.oracleclient; oracleconnection a = new oracleconnection(); a.connectionstring = "User ID=" + /*your_oracle_user*/ + ";Password=" + /*your_oracle_password*/ + ";Data Source=" + "(DESCRIPTION = " + " (ADDRESS = (PROTOCOL = TCP)(HOST = " + /*Your_host_name_or_ipaddress*/ + ")(PORT = 1521)) " + " (CONNECT_DATA = " + " (SERVER = DEDICATED) " + " (SID = " + /*Your_Sid_NAME*/ + ") " + " ) " + ")"; a.open();