RE: [aus-dotnet] System.DllNotFoundException: Unable to load DLL (oci.dll).


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Hordern, Chris \(Hordern Cons. at Alcoa\)
    • Subject: RE: [aus-dotnet] System.DllNotFoundException: Unable to load DLL (oci.dll).
    • Date: Thu, 02 Dec 2004 14:10:45 +1100

    We have success!!!  Followed the steps and hey presto.
    
    Still had to go through the rigmarole of getting a short connection
    string name that actually resolves. 
    
    
    ________________________________
    
    CHRIS HORDERN
    HORDERN CONSULTING AT ALCOA
    PH. 03 5245 1323
    MOB. 0418 543220
    EMAIL: chris.hordern@xxxxxxxxxxxx
    ________________________________
    
    
    
    -----Original Message-----
    From: dotnet-owner@xxxxxxxxxxx [mailto:dotnet-owner@xxxxxxxxxxx] 
    Sent: Thursday, December 02, 2004 9:48
    To: dotnet@xxxxxxxxxxx
    Subject: RE: [aus-dotnet] System.DllNotFoundException: Unable to load
    DLL (oci.dll).
    
    Exprerienced a similar and possibly related problem a few days ago.
    Here's the cause and resolution (Sorry for the long post):
    
    >> ----
    
    Found an interesting problem today while using the .NET Oracle Provider
    (System.Data.OracleClient) with Oracle 9.2 client.  We kept getting the
    following error message while connecting to an Oracle 9.2 DB from a
    Windows Service (.NET) running as LocalSystem -
    
     
    
     
    System.Data.OracleClient requires Oracle client software version 8.1.7
    or greater. 
     
     
    
    This was odd because we could verify that Oracle Client 9.2 was
    installed on the box and worked correctly.  Here's the cause and
    solution I found on the web, hope it helps.
    
     
    Cause
    
    ------------
    
    If you install Oracle9i Release 2 (9.2.0.1.0) on a computer running
    Windows with an NTFS partition, the contents of ORACLE_HOME directory
    will not be visible to users who are authenticated on that machine.
    These permissions were not set properly when the software was installed.
    
     
    Applications that were working fine with previous versions of Oracle
    software will stop working when they upgrade to Oracle 9.2. 
     
    NOTE: The application will continue to work if the user has logged onto
    the 
          machine as an Administrator. 
     
    Any application that is using the Authenticated User privilege will not
    work. 
    A notable example would be IIS which might service some of the requests
    based on the Authenticated User privileges. 
     
    Solution
    
    ---------------
    
      Oracle 9.2 Client software requires that you give the Authenticated
    User
      privilege to the Oracle Home by following these steps: 
     
       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). 
     
       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. 
     
       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 (IMPORTANT). 
     
     
    Re-execute the application and it should now work. 
     
    >> 
    
    
    -----Original Message-----
    From: Mr vince tomasian [mailto:vincedeveloper@xxxxxxxxx]
    Sent: Thursday, 2 December 2004 9:39 AM
    To: dotnet@xxxxxxxxxxx
    Subject: Re: [aus-dotnet] System.DllNotFoundException: Unable to load
    DLL (oci.dll).
    
    I had the same problem a few months ago and it was indeed a security
    issue.
    
    Trying to remember back, it was either a security problem on the oracle
    directory itself (in which case give full control to everyone as a test)
    or an issue with the user / asp.net account which tries to connect to
    oracle via IIS.
    
    as an added test i would try to run a small asp.net page which connects
    to oracle .. 
    
    Vince
    
    
    --- Mitch Wheat <mitch@xxxxxxxxxxxx> wrote:
    
    > Hi Chris
    > 
    > It's a stab in the dark really (but coincidently, my colleagues were 
    > having a similar problem): have you tried using the Oracle provider 
    > instead of the Microsoft supplied one?
    > 
    > Mitch
    > 
    > ----- Original Message -----
    > From: "Hordern, Chris (Hordern Cons. at Alcoa)"
    > <Chris.Hordern@xxxxxxxxxxxx>
    > To: <dotnet@xxxxxxxxxxx>
    > Sent: Wednesday, December 01, 2004 3:50 PM
    > Subject: [aus-dotnet] System.DllNotFoundException:
    > Unable to load DLL
    > (oci.dll).
    > 
    > 
    > I've got a webservice that runs successfully on the development 
    > machine and is now deployed to a Windows 2003 Server. The webservice 
    > connects to a Oracle 9i database. The Oracle client has been installed
    
    > on the server and using sql plus it connect fine to the relevant 
    > database.
    > 
    > When we run the test connection method in the webservice the following
    
    > error occurs
    > 
    > System.DllNotFoundException: Unable to load DLL (oci.dll).
    >    at
    >
    System.Data.OracleClient.DBObjectPool.GetObject(Object
    > owningObject, Boolean& isInTransaction)
    >    at
    >
    System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection
    > (String encryptedConnectionString,
    > OracleConnectionString options,
    > OracleConnection owningObject, Boolean&
    > isInTransaction)
    >    at
    >
    System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionS
    > tring parsedConnectionString, Object transact)
    >    at
    > System.Data.OracleClient.OracleConnection.Open()
    >    at PODSECLoadWS.DataLoadBR.TestConnection() in 
    > C:\Projects\PODS\PODSECLoadWS\DataLoadBR.vb:line 223
    >    at PODSECLoadWS.DataLoadWS.TestConnection() in
    >
    C:\Projects\PODS\PODSECLoadWS\DataLoadWS.asmx.vb:line
    > 67
    > 
    > Any ideas. I ran filedomon.exe and could not see any ACCESSS DENIED 
    > messages so it appears permissions are ok.
    > 
    > Any ideas??
    > 
    > and yes I hate Oracle
    > 
    > ________________________________
    > 
    > CHRIS HORDERN
    > HORDERN CONSULTING AT ALCOA
    > PH. 03 5245 1323
    > MOB. 0418 543220
    > EMAIL: chris.hordern@xxxxxxxxxxxx
    > ________________________________
    > 
    > 
    > _________________
    > You are a part of the Australian "dotnet" mailing list.
    > To unsubscribe send "unsubscribe dotnet" or to re-subscribe send 
    > "subscribe dotnet Your Name" in the body of the email to: 
    > imailsrv@xxxxxxxxxxx List managed by: http://www.stanski.com
    > 
    
    
    
    	
    		
    __________________________________
    Do you Yahoo!? 
    Yahoo! Mail - You care about security. So do we. 
    http://promotions.yahoo.com/new_mail
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send
    "subscribe dotnet Your Name" in the body of the email to:
    imailsrv@xxxxxxxxxxx List managed by: http://www.stanski.com
    
    
    **************   IMPORTANT MESSAGE  **************
    This e-mail message is intended only for the addressee(s) and contains
    information which may be confidential. 
    If you are not the intended recipient please advise the sender by return
    email, do not use or disclose the contents, and delete the message and
    any attachments from your system. Unless specifically indicated, this
    email does not constitute formal advice or commitment by the sender or
    the Commonwealth Bank of Australia (ABN 48 123 123 124) or its
    subsidiaries. 
    We can be contacted through our web site: commbank.com.au. 
    If you no longer wish to receive commercial electronic messages from us,
    please reply to this e-mail by typing Unsubscribe in the subject line.
    ***************************************************************
    
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send
    "subscribe dotnet Your Name" in the body of the email to:
    imailsrv@xxxxxxxxxxx
    List managed by: http://www.stanski.com
    _________________
    You are a part of the Australian "dotnet" mailing list.
    To unsubscribe send "unsubscribe dotnet" or to re-subscribe send "subscribe dotnet Your Name" in the body of the email to: imailsrv@xxxxxxxxxxx
    List managed by: http://www.stanski.com
    
    



    (Click here for more information on the aus-dotnet mailling list)