Oracle Autonomous Database supports connectivity to the Microsoft .NET Framework, .NET Core, Visual Studio, and Visual Studio Code using TLS authentication without a wallet.
Oracle Data Provider for .NET (ODP.NET) provides run-time ADO.NET data access to Autonomous Database. ODP.NET has the following driver types:
Unmanaged ODP.NET for .NET Framework applications
Managed ODP.NET for .NET Framework applications
ODP.NET Core for .NET Core applications
Oracle Developer Tools for Visual Studio and Oracle Developer Tools for VS Code provide database application design-time support in the Microsoft development environment, including tools for managing Autonomous Databases in the Oracle Cloud.
Oracle Developer Tools for VS Code provides database application design-time support in Visual Studio Code.
These software components are available as a free download from the following sites:
- Managed ODP.NET and ODP.NET Core: NuGet Gallery
- Unmanaged ODP.NET: Oracle Data Access Components Downloads
- Oracle Developer Tools for Visual Studio Code: VS Code Marketplace
- Oracle Developer Tools for Visual Studio: Oracle Developer Tools for Visual Studio
Oracle recommends using the latest provider and tools version with Oracle Autonomous Database.
When you connect using TLS authentication with managed ODP.NET and
ODP.NET Core you do not need to deploy the Oracle wallet or the Oracle network
tnsnames.ora with your application. Instead, you supply the
data source attribute, a TLS connection string, with the configuration information
in the ODP.NET connection.
To use TLS connections with Managed ODP.NET and ODP.NET Core, do the following:
Obtain managed ODP.NET or ODP.NET Core versions 19.13 or 21.4 (or above). Lower level versions do not support TLS connections with Oracle Autonomous Database.
Enable TLS connections on your Autonomous Database instance. See Update your Autonomous Database Instance to Allow both TLS and mTLS Authentication for details.
After you enable TLS connections, supply a TLS connection string in the ODP.NET data source to connect to an Autonomous Database instance. See View TNS Names and Connection Strings for an Autonomous Database Instance for details on viewing or copying TLS connection strings.
Notes for the TLS connection string:
The TLS connection string uses quotation marks around the distinguished name. If you store the TLS connection string in a .NET string, add a backslash escape sequence before each quotation mark (for example, \" ). This allows .NET to recognize the quotation mark as part of the TLS connection string.
Verify that the connection string includes
(SECURITY=(SSL_SERVER_DN_MATCH=TRUE))to ensure that the client matches the server DN. If not specified, add this to the connect string. For example:
(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521) (host=HOSTNAME))(connect_data=(service_name=SERVICE_NAME)) (security=(ssl_server_dn_match=true)))
Allowing TLS connections to Autonomous Database does not disallow mutual TLS (mTLS) connections. Both Mutual TLS (mTLS) and TLS connections are valid when an Autonomous Database instance is configured to allow TLS connections. See Connect Microsoft .NET, Visual Studio Code, and Visual Studio with a Wallet (mTLS) for information on connecting using mutual TLS (mTLS) with a wallet.
To learn more about using Oracle Autonomous Database and .NET, try the free .NET Development with Oracle Autonomous Database Quick Start. This lab walks you through setting up a .NET web server on Oracle Cloud Infrastructure that connects to Oracle Autonomous Database. Next, the lab guides developing and deploying a simple ASP.NET Core web application that uses all these components. By the end, you will have a live, working website on the Internet.