I have a app targeting Microsoft.AspNetCore.App 2.2.0 and using the latest nuget packages: Devart.Data, Devart.Data.Oracle, Devart.Data.Oracle.EFCore. When running this app in Visual Studio using IIS Express, the app successfully connects to my oracle database. However, when deploying this app as a Framework or Standalone app, when launching on 64 bit Windows, I get an exception:
Cannot obtain Oracle Client information from registry. Make sure that Oracle Client Software is installed and that the bitness of your application (x64) matches the bitness of your Oracle Client, or use the Direct mode of connecting to a server. (See inner exception for details.) - Cannot obtain Oracle Client information from registry. Make sure that Oracle Client Software is installed and that the bitness of your application (x64) matches the bitness of your Oracle Client, or use the Direct mode of connecting to a server.
When launching this same app on a Linux machine, I get this:
The OCI connection mode is supported on .NET Standard (.NET Core) for the Microsoft Windows x86/x64 platform only. You are currently using Linux 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 (X64). Use the Direct Mode instead. (See inner exception for details.) - The OCI connection mode is supported on .NET Standard (.NET Core) for the Microsoft Windows x86/x64 platform only. You are currently using Linux 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 (X64). Use the Direct Mode instead.
My connection string is formatted as follows:
User Id=****;Password=****;Service Name=****;Data Source=****;direct=true;license key=****
Direct mode is working using IISExpress as I do not have an oracle client installed on my machine or my coworkers machine. My connection string contains direct=true. Not sure what is going on here?
Connection String Only Working On IISExpress
Re: Connection String Only Working On IISExpress
Most likely, the deployed application uses a different connection string (with default direct=false).
1. Is your code using connection string from *.json?
2. Does your application include debug (appsettings.Development.json) and release (appsettings.json) versions of this file?
3. Send us a small test project so that we can reproduce the issue in our environment.
1. Is your code using connection string from *.json?
2. Does your application include debug (appsettings.Development.json) and release (appsettings.json) versions of this file?
3. Send us a small test project so that we can reproduce the issue in our environment.