'The specified store provider cannot be found in the configuration, or is not valid.'

Nattiko Mattiphong 1 Reputation point
2022-08-08T16:07:13.323+00:00

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
229230-screenshot-2022-08-08-221255.png

229149-screenshot-2022-08-08-230351.png

Developer technologies | .NET | Other
Developer technologies | ASP.NET | Other
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 78,161 Reputation points Volunteer Moderator
    2022-08-08T16:42:33.41+00:00

    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.


  2. Bruce (SqlWork.com) 78,161 Reputation points Volunteer Moderator
    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

    0 comments No comments

  3. Lan Huang-MSFT 30,191 Reputation points Microsoft External Staff
    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.