Unable to load DLL (oci.dll)

It's been written in several places, but lots of people still seem to get this error when deploying ASP.NET apps that use Oracle on win2k3. It's all about permission to the oracle client directories. Make sure Everyone or the ASPNET account got read and execute access to the oracle client directories, especially the bin dir and where you keep your tnsnames.ora file.

You may have to reboot the server to make it work properly. Sometimes it works straight off with a restart of the web app, but I've had to reboot the server once to make it work.

If you add the rights to the top "oracle" or "ora92" directory or similar, make sure the rights gets applied to the lower directories. Windows 2003 can be a bit tricky with that.

Published Sunday, November 21, 2004 12:07 AM by jdanforth

Comments

# re: Unable to load DLL (oci.dll)

Thursday, December 02, 2004 1:09 AM by Shakil
hello
Can u tell me how to give access right to the bin folder and the tnsoranames folder it would be a great help

reply to bharuchashakil@yahoo.com

# re: Unable to load DLL (oci.dll)

Thursday, December 02, 2004 10:09 PM by swetha
I am getting error Unable to load DLL (oci.dll)

# re: Unable to load DLL (oci.dll)

Friday, December 10, 2004 2:59 AM by PINAR SAHIN
1. Log on to Windows as a user with Administrator privileges.
2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME folder. This is typically the "Ora92" folder under the "Oracle" folder (i.e. D:\Oracle\Ora92) in Oracle9iR2 or "Client_1" folder under the "Oracle\product\10.1.0" folder (i.e. D:\Oracle\product \10.1.0\Client_1) in Oracle10gR1.
3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear.
4. Click on the "Security" tab of the "Properties" window. NOTE: If you are running Windows XP and do not have a "Security" tab please do the following:
(a) Open "Folder Options" in your Control Panel. (
(b) Choose the "View" tab.
(c) Under "Advanced Settings" uncheck the option "Use simple file sharing (Recommended)". The "Security" tab should now be available.
5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names").
6. Uncheck the "Read and Execute" box in the "Permissions" list under the "Allow" column (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users").
7. Re-check the "Read and Execute" box under the "Allow" column (this is the box you just unchecked).
8. Click the "Advanced" button and in the "Permission Entries" list make sure you see the "Authenticated Users" listed there with: Permission = Read & Execute Apply To = This folder, subfolders and files If this is NOT the case, edit that line and make sure the "Apply onto" drop-down box is set to "This folder, subfolders and files". This should already be set properly but it is important that you verify this.
9. Click the "Ok" button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.
10. Reboot your computer to assure that these changes have taken effect.
11. Re-execute the application and it should now work.
NOTE: If the problem continues to occur, please go back through these same 11 steps but when performing step 8 additionally check the box entitled "Replace permission entries on all child objects with entries shown here that apply to child objects" and be sure to reboot in step 10.

# re: Unable to load DLL (oci.dll)

Friday, November 17, 2006 9:33 AM by kalpana kadam

i m stii facing same problem

# re: Unable to load DLL (oci.dll)

Saturday, November 18, 2006 12:51 AM by seema

I am getting error Unable to load DLL (oci.dll).

I have done above changes also.

i have reinstalled oracle 9i n win2000 also.

but stil i m facing same problem

plz help me out.my email-------

kalp_10@yahoo.com

# re: Unable to load DLL (oci.dll)

Friday, November 24, 2006 5:44 AM by dinesh

i m also facing the same problem. and not getting the folder option in control panel in my system. I m using windows Xp

# re: Unable to load DLL (oci.dll)

Wednesday, December 20, 2006 2:48 AM by sufian shwayat

i have the same problem unable to load oci.dll

and want someone to anser it,i have winxp sp2

# re: Unable to load DLL (oci.dll)

Friday, December 29, 2006 3:19 AM by rajiv

i have same problem about unable to load oci.dll please imitely reply my mail and my o.s is win2k  server

# Unable to load DLL (oci.dll) « Be Your Self

Friday, February 22, 2008 1:02 AM by Unable to load DLL (oci.dll) « Be Your Self

Pingback from  Unable to load DLL (oci.dll) « Be Your Self