Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Is Wallet (file method) compatible with odp.net managed driver 12.1.0.1.0?

treigerOct 8 2013 — edited Jul 12 2014


I am trying to use oracle wallet with the new odp.net managed driver, but I am getting "invalid username/password". As the wallet itself is ok (it works with the unmanaged client), seems to me that this new provider is not fully compatible with Oracle Wallet. Is this true?

I am trying this:

<oracle.manageddataaccess.client>

    <version number="*">

      <settings>

        <setting name="tns_admin" value="D:\oracle\product\11.2.0\client_1\network\admin" />

        <setting name="WALLET_LOCATION" value="D:\oracle\wallets" />

      </settings>

    </version>

  </oracle.manageddataaccess.client>

Regards

Sergio Treiger

Comments

treiger

Hi Alex,

My sqlnet.ora works fine with unmanaged client. I am able to connect with wallet. But with managed client I am only able to connect providing username /password in the connection string.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES)

WALLET_LOCATION =

   (SOURCE =

     (METHOD = FILE)

     (METHOD_DATA =

       (DIRECTORY = D:\oracle\wallets)

     )

   )

SQLNET.WALLET_OVERRIDE = TRUE

SSL_CLIENT_AUTHENTICATION = FALSE

SSL_VERSION = 0

Alex Keh-Oracle

Sorry, I wasn't clearer. Use the syntax inside your .NET config file. Your incorrect .NET config file setting would override your sqlnet.ora settings in ODP.NET's order of precedence. For example, your .NET config file would look something like:

<oracle.manageddataaccess.client>

<version number="*">

<settings>

<setting name="tns_admin" value="D:\oracle\product\11.2.0\client_1\network\admin" />

<setting name="WALLET_LOCATION" value="(SOURCE =(METHOD = FILE)(METHOD_DATA =(DIRECTORY = D:\oracle\wallets)))" />

</settings>

</version>

</oracle.manageddataaccess.client>

That's assuming the "wallets" directory contains the final wallet directory (i.e. contains the cwallet.sso file).

treiger

Thanks for the answer Alex, but it´s still not working. I am getting the same error.

The reason I´ve asked in the first place about the compatibility of wallet file method and managed odp is page 3 of this document

http://docs.oracle.com/cd/E16655_01/win.121/e17732.pdf

"WALLET_LOCATION : Only METHOD supported is MCS"

Is that so?

Alex Keh-Oracle

If you are using managed ODP.NET from the Oracle DB Client, then FILE is not supported. If you are using managed ODP.NET from ODAC 12c, then FILE is supported. Here's a link to the <settings> config section where we document support.

Configuring Oracle Data Provider for .NET

Make sure you are using the ODAC 12c version.

treiger

Thank you again Alex.

I have in this server twoo instalations (both downloaded from "64-bit Oracle Data Access Components (ODAC) Downloads" page):

1 - unmanaged client (the one that works with wallet)

64-bit ODAC 11.2 Release 5 (11.2.0.3.20) for Windows x64           [Released September 11, 2012]

ODAC1120320_x64.zip - 225 MB (230,297,429 bytes)

2 - managed client (the one that is not working with wallet)

64-bit ODAC 12c Release 1 (12.1.0.1.0) Xcopy for Windows x64           [Released August 13, 2013]

ODP.NET_Managed121010.zip - 1.91 MB (2,007,194 bytes)

Should it be working in this scenario? What am I missing here?

Alex Keh-Oracle

Yes, it should be working. It could be a bug or there could be a mis-configured setting. Since I can't reproduce it on my end, I can't determine which it is.

I would recommend opening up a service request with Oracle Support and having them identify the root cause of the problem. If it's a bug, we'll need to understand what is specific in your setup that may be causing it that we're not seeing.

1051744

Trieger, did you ever make progress with this issue? I'm running into the same thing.

1051755

Same here...additional information for us is that we created the wallet and credentials using v11 tools and we are also trying to connect to a v11 instance.  I'm not sure if that matters.  We have the exact same configuration and our connection string is defined as "Data Source=XYZ;User Id=/".  With the Unmanaged client we used to supply "Integrated Security=true" to get the wallet to work, but that property is not supported in the 12c Managed client.  We have WALLET_LOCATION and TNS_ADMIN set in our local App.config file.  I'm assuming that this will override machine.config.  Do we have to provide the WALLET_PASSWORD or something like that?

treiger

Actually no progress. I´ve just tried the new version released last month and got the same error

athompson88

I take it there is no way to use wallets with versions prior to 12. Can someone confirm if that is correct?

Alex Keh-Oracle

Treiger (and others),

Try setting the "SSL_VERSION" to a valid value or take it out, then see if the wallet will work.

treiger

Still not working.

In the meantime, we have openned a service request with Oracle support, but they did not give us any answer at all.

Here is some more info:

1 - The sqlnet.ora (for my unmanaged client that works) is this:

SQLNET.AUTHENTICATION_SERVICES = (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES)

WALLET_LOCATION =

   (SOURCE =

     (METHOD = FILE)

     (METHOD_DATA =

       (DIRECTORY = D:\oracle\wallets)

     )

   )

SQLNET.WALLET_OVERRIDE = TRUE

SSL_CLIENT_AUTHENTICATION = FALSE

SSL_VERSION = 0

2 - TNSNAMES.ORA has this configuration:

pj_hml1_XPTO =

  (DESCRIPTION =

    (ADDRESS_LIST =

        (ADDRESS =

          (COMMUNITY = world)

          (PROTOCOL = TCP)

          (Host = 1.10.3.31)

          (Port = 1521)

        )

    )

    (CONNECT_DATA = (SID = PJORAH01)

     )

)

3 - My connection string is this:

"Data Source=pj_hml1_XPTO;User ID=/;"

4 - I have tried the configurations below in machine.config, without success:

4.1

<oracle.manageddataaccess.client>

    <version number="*">

      <settings>

        <setting name="tns_admin" value="d:\oracle\network\admin" />

        <setting name="WALLET_LOCATION" value="(SOURCE =(METHOD = FILE)(METHOD_DATA =(DIRECTORY = D:\oracle\wallets)))" />

        <setting name="SSL_VERSION" value= "0" />

        <setting name="SSL_CLIENT_AUTHENTICATION" value = "FALSE" />

        <setting name="SQLNET.WALLET_OVERRIDE" value = "TRUE" />

      </settings>

    </version>

  </oracle.manageddataaccess.client>

</configuration>

4.2

<oracle.manageddataaccess.client>

    <version number="*">

      <settings>

        <setting name="tns_admin" value="d:\oracle\network\admin" />

        <setting name="WALLET_LOCATION" value="(SOURCE =(METHOD = FILE)(METHOD_DATA =(DIRECTORY = D:\oracle\wallets)))" />

        <setting name="SSL_VERSION" value= "0" />

        <setting name="SSL_CLIENT_AUTHENTICATION" value = "FALSE" />

        <setting name="WALLET_OVERRIDE" value = "TRUE" />

      </settings>

    </version>

  </oracle.manageddataaccess.client>

</configuration>

4.3

<oracle.manageddataaccess.client>

    <version number="*">

      <settings>

        <setting name="tns_admin" value="d:\oracle\network\admin" />

        <setting name="WALLET_LOCATION" value="(SOURCE =(METHOD = FILE)(METHOD_DATA =(DIRECTORY = D:\oracle\wallets)))" />

        <setting name="SSL_VERSION" value= "0" />

      </settings>

    </version>

  </oracle.manageddataaccess.client>

</configuration>

4.4

<oracle.manageddataaccess.client>

    <version number="*">

      <settings>

        <setting name="tns_admin" value="d:\oracle\network\admin" />

        <setting name="WALLET_LOCATION" value="(SOURCE =(METHOD = FILE)(METHOD_DATA =(DIRECTORY = D:\oracle\wallets)))" />

      </settings>

    </version>

  </oracle.manageddataaccess.client>

</configuration>

regards

Alex Keh-Oracle

You can ask the support analyst to contact me if you don't feel you're making progress. He/She will know how to reach me.

user13179409

I am running into the same issues here. Is there any progress on finding a solution?

user463061

Same issues here with odp.net managed driver version 12.1.0.1.2

Any new idea?

Alex Keh-Oracle

Here's how to configure file method wallets:

1. Create wallets for DB server, listener, and client. Suppose wallets are under below paths.

c:\temp\wal_ca

c:\temp\wal_server

c:\temp\wal_lsnr

c:\temp\wal_client

On the server side:

2. Stop original listener

3. sqlnet.ora

sqlnet.authentication_services=(NTS)

ssl_client_authentication=false

WALLET_LOCATION=

  (SOURCE=

     (METHOD=FILE)

     (METHOD_DATA=

         (DIRECTORY=c:\temp\wal_server)

     )

  )

4. listener.ora

listener=(DESCRIPTION=

  (ADDRESS=(PROTOCOL=tcps)(HOST=<server hostname>)(PORT=9985))

)

ssl_client_authentication=false

SID_LIST_listener=(SID_LIST=

  (SID_DESC=(SID_NAME=x1212)(ORACLE_HOME=<Home Directory>))

  (SID_DESC=(SID_NAME=x1212)(GLOBAL_DBNAME=<Global DB Name>))

)

WALLET_LOCATION=

  (SOURCE=

     (METHOD=FILE)

     (METHOD_DATA=

         (DIRECTORY=c:\temp\wal_lsnr)

     )

  )

5. start listener

On the client side:

6. sqlnet.ora

sqlnet.authentication_services=(NTS)

ssl_client_authentication=false

WALLET_LOCATION=

  (SOURCE=

     (METHOD=FILE)

     (METHOD_DATA=

         (DIRECTORY=c:\temp\wal_client)

     )

  )

7. tnsnames.ora

inst1 = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=<server hostname>)(PORT=9985))(CONNECT_DATA=(SERVICE_NAME=<Global DB Name>)))

8. Try to connect to DB with ODP.NET, Managed Driver. It should work fine.

If you need authenticate client side, set "ssl_client_authentication" to true.

If you need to set the "WALLET_LOCATION" in a .NET config file, here is syntax.

<configuration>

  <oracle.manageddataaccess.client>

    <version number="*">

        <settings>

        <setting name="tns_admin" value="C:\tns_admin_directory" />

        <setting name="WALLET_LOCATION" value="(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=c:\temp\wal_client)))"/>

        </settings>

   </version>

  </oracle.manageddataaccess.client>

</configuration>

1 - 17
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 9 2014
Added on Oct 8 2013
17 comments
12,286 views