the error say the provider specified in the connection string, is not built into the project. you probably need to add oracle support via a nuget package. see the oracle docs for proper package.
'The specified store provider cannot be found in the configuration, or is not valid.'
Help me please.
when I run the program. It' can't connect To Oracle database .
but I use Server explorer query .It's work
project asp.net framwork 4.8 MVC
Entity V 5.0
3 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 55,601 Reputation points
2022-08-08T21:59:45.437+00:00 but the error indicates that you are probably using EF/AdoDb, not the native OracleClient (the OracleClient connection string does not have a provider). you probably want the Oracle Data Provider for .net. This has a driver for Linq to Sql and Entity Framework.
https://docs.oracle.com/database/121/ODPNT/install.htm#ODPNT0006
-
Lan Huang-MSFT 25,471 Reputation points Microsoft Vendor
2022-08-09T06:05:35.7+00:00 Hi @Nattiko Mattiphong ,
In application pools and advanced settings. Look at "Enable 32-bit applications" and see if it's enabled.
Try changing the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Machine.config<system.Data>
tag as follows:<system.data> <DbProviderFactories> <add name="ODP.NET, Unmanaged Driver" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET, Unmanaged Driver" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> </DbProviderFactories> </system.data>
add this line in web.config for web app, or in App.config if it is console App. under
<configurations> </configurations>
tag (Under not inside).<system.data> <DbProviderFactories> <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /> </DbProviderFactories> </system.data>
Configuring Oracle Data Provider for .NET
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.