Use the same TNS alias, username, and password to connect your .NET application to ADB.
- Use this managed ODP.NET sample code if you do not have an existing app. Sample code instructions are in the README and comments.
- Create a new .NET Framework C# console project.
- Download and install managed ODP.NET (Oracle.ManagedDataAccess) from NuGet Gallery into the .NET project.
- Open Program.cs and copy the managed ODP.NET sample code contents to this file and save.
- In the app.config, replace only the <oracle.manageddataaccess.client> section with the one from the sample code.
- Configure the sample code to connect to your ADB instance. Provide values for the following:
- User Id (i.e. Admin)
- Password
- Data Source (i.e. myadb_high)
- app.config TNS_ADMIN (i.e. directory ADB credentials were unzipped to)
- app.config WALLET_LOCATION (i.e. directory ADB credentials were unzipped to)
- Execute the app in Visual Studio.
You should see the database version number outputted as a result. Congratulations! You connected to Oracle Autonomous Database.
Note: Managed and unmanaged ODP.NET 12.2 and higher support connecting to ADB.