can't load OCI.DLL

Discussion in 'ASP .Net' started by news.microsoft.com, Jul 1, 2004.

  1. Hello,

    Another issue has risen after installing Visual Studio 2005. When I use
    OracleClient with ASP.NET v1.1 I receive an error stating it can't load
    OCI.DLL.

    This has never been a issue before so I assume that it is a result of the
    new version of VS. Doe's anyone know a fix for this problem?

    Thanks,
    Bryan
     
    news.microsoft.com, Jul 1, 2004
    #1
    1. Advertising

  2. That's usually a problem with the Oracle client or permissions.

    1. Make sure the ASPNET account has sufficient permissions in the Oracle
    folder.
    2. Confirm the version of the Oracle client is 8.1.7 or later.
    3. Check the connection string is correct.

    Use Oracle With ADO.NET
    Access Oracle databases from your .NET apps.
    http://www.fawcette.com/vsm/2003_01/magazine/features/beauchemin/

    Here's a quote:

    "Once you install the .NET data provider of your choice and an Oracle client
    if
    necessary, you need to ensure that the current user has access to
    directories
    where the client software resides. Later versions of the Oracle client
    protect
    the client libraries with a discretionary access control list (DACL). If
    you're
    using ASP.NET, you must also ensure that the appropriate "Web server users"
    (usually the user named ASPNET who runs the ASP.NET worker process) can
    access
    the client. Because ASPNET has only ordinary user privileges and not
    administrator privileges, you need to add ASPNET to the Access Control List.
    If
    the ASPNET user doesn't have access, you'll receive a message such as
    "Cannot
    load OCI.dll" or "ORA-12154 TNS: could not resolve service name."


    use that DLL.
    "news.microsoft.com" <> wrote in message
    news:%...
    > Hello,
    >
    > Another issue has risen after installing Visual Studio 2005. When I use
    > OracleClient with ASP.NET v1.1 I receive an error stating it can't load
    > OCI.DLL.
    >
    > This has never been a issue before so I assume that it is a result of the
    > new version of VS. Doe's anyone know a fix for this problem?
    >
    > Thanks,
    > Bryan
    >
    >
     
    Ken Cox [Microsoft MVP], Jul 1, 2004
    #2
    1. Advertising

  3. news.microsoft.com

    sluggy Guest

    Bryan,
    as Ken said, make sure the ASPNET user has sufficient rights. We have found that you need to assign
    the rights from the root Oracle folder, just doing the /bin folder will not do the trick, obviously
    oci.dll loads stuff from outside the bin folder. If you get really keen you could use depends.exe to
    examine the imports of oci.dll, and determine what it is loading and from where.

    HTH,
    sluggy


    On Wed, 30 Jun 2004 16:20:47 -0700, "news.microsoft.com" <> wrote:

    >Hello,
    >
    >Another issue has risen after installing Visual Studio 2005. When I use
    >OracleClient with ASP.NET v1.1 I receive an error stating it can't load
    >OCI.DLL.
    >
    >This has never been a issue before so I assume that it is a result of the
    >new version of VS. Doe's anyone know a fix for this problem?
    >
    >Thanks,
    >Bryan
    >
     
    sluggy, Jul 1, 2004
    #3
  4. In response to your suggestions

    1. Make sure the ASPNET account has sufficient permissions in the Oracle
    folder.
    I gave the account full permissions and then I receive the following
    error.
    "Could not create an environment: OCIEnvCreate returned -1"

    2. Confirm the version of the Oracle client is 8.1.7 or later.
    I am using Oracle client 9.2

    3. Check the connection string is correct.
    The connection string works with a WinForms app that connects to Oracle.

    I checked all of this before posting. I wasn't sure where to go from there
    that is why I posted it to the newsgroup.

    Thanks,
    Bryan


    "Ken Cox [Microsoft MVP]" <> wrote in message
    news:%...
    > That's usually a problem with the Oracle client or permissions.
    >
    > 1. Make sure the ASPNET account has sufficient permissions in the Oracle
    > folder.
    > 2. Confirm the version of the Oracle client is 8.1.7 or later.
    > 3. Check the connection string is correct.
    >
    > Use Oracle With ADO.NET
    > Access Oracle databases from your .NET apps.
    > http://www.fawcette.com/vsm/2003_01/magazine/features/beauchemin/
    >
    > Here's a quote:
    >
    > "Once you install the .NET data provider of your choice and an Oracle

    client
    > if
    > necessary, you need to ensure that the current user has access to
    > directories
    > where the client software resides. Later versions of the Oracle client
    > protect
    > the client libraries with a discretionary access control list (DACL). If
    > you're
    > using ASP.NET, you must also ensure that the appropriate "Web server

    users"
    > (usually the user named ASPNET who runs the ASP.NET worker process) can
    > access
    > the client. Because ASPNET has only ordinary user privileges and not
    > administrator privileges, you need to add ASPNET to the Access Control

    List.
    > If
    > the ASPNET user doesn't have access, you'll receive a message such as
    > "Cannot
    > load OCI.dll" or "ORA-12154 TNS: could not resolve service name."
    >
    >
    > use that DLL.
    > "news.microsoft.com" <> wrote in message
    > news:%...
    > > Hello,
    > >
    > > Another issue has risen after installing Visual Studio 2005. When I use
    > > OracleClient with ASP.NET v1.1 I receive an error stating it can't load
    > > OCI.DLL.
    > >
    > > This has never been a issue before so I assume that it is a result of

    the
    > > new version of VS. Doe's anyone know a fix for this problem?
    > >
    > > Thanks,
    > > Bryan
    > >
    > >

    >
     
    news.microsoft.com, Jul 1, 2004
    #4
  5. That was the problem thanks!!


    "sluggy" < (this is fake, don't use it)> wrote in message
    news:...
    > Bryan,
    > as Ken said, make sure the ASPNET user has sufficient rights. We have

    found that you need to assign
    > the rights from the root Oracle folder, just doing the /bin folder will

    not do the trick, obviously
    > oci.dll loads stuff from outside the bin folder. If you get really keen

    you could use depends.exe to
    > examine the imports of oci.dll, and determine what it is loading and from

    where.
    >
    > HTH,
    > sluggy
    >
    >
    > On Wed, 30 Jun 2004 16:20:47 -0700, "news.microsoft.com"

    <> wrote:
    >
    > >Hello,
    > >
    > >Another issue has risen after installing Visual Studio 2005. When I use
    > >OracleClient with ASP.NET v1.1 I receive an error stating it can't load
    > >OCI.DLL.
    > >
    > >This has never been a issue before so I assume that it is a result of the
    > >new version of VS. Doe's anyone know a fix for this problem?
    > >
    > >Thanks,
    > >Bryan
    > >

    >
     
    news.microsoft.com, Jul 1, 2004
    #5
  6. news.microsoft.com

    GrahamA

    Joined:
    Aug 7, 2006
    Messages:
    2
    Location:
    Sydney, Australia
    I thought I replied to this post, maybe there's multiple threads with the same issue?

    here it is again in case I didn't hit save before!



    I too encountered this issue a couple of times and am not impressed by the lack of "solutions" out here on-line.

    Many people have advised that this is a permissions error - as above.

    In fact, they're 100% correct. I found that by applying Read/Execute permissions for ASPNET to the Oracle folder, it wasn't applying to ALL of the folders.

    Go through the various subfolders and ensure the permissions have been replicated throughout. This solved the problem for me.

    Hope this helps.
    Graham.
     
    GrahamA, Aug 7, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sweety

    OCI links required

    Sweety, Oct 23, 2003, in forum: C++
    Replies:
    1
    Views:
    303
    Moonlit
    Oct 23, 2003
  2. RTJ
    Replies:
    2
    Views:
    4,039
    Sanjay Rana
    Sep 27, 2006
  3. Dima
    Replies:
    0
    Views:
    319
  4. SonicChen
    Replies:
    0
    Views:
    166
    SonicChen
    Jan 17, 2006
  5. Maung Aung

    OCI.dll was not found error

    Maung Aung, Jul 27, 2007, in forum: Ruby
    Replies:
    1
    Views:
    624
    Yusuf Celik
    Jul 28, 2007
Loading...

Share This Page