1

I need help with this connection string I am using. First a little background: I set up another PC with the XE version of Oracle. This PC is connected to a hub, which my PC is connected to as well. I also added this PC to my computers tnsnames.ora file for Oracle and it the entry looks like this...

EF1DEV.TEST.SERVER =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = testcomputername.my.test.dom)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = xe)
    )
  )

I then went into visual studio 2010 and Generated a Model (.edmx) from an existing database using TNS and the tnsnames entry I added, and it worked fine. The connection string was generated in the app.config file for the project and it looks like this.

<add name="Test_Entities" connectionString="metadata=res://*/TestDatabase.csdl|res://*/TestDatabase.ssdl|res://*/TestDatabase.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string=&quot;DATA SOURCE=EF1DEV.TEST.SERVER;PASSWORD=hr;USER ID=HR&quot;" providerName="System.Data.EntityClient" />

The issue is when I try to actually use my model in code. Like This:

using(Test_Entities testEnt = new Test_Entities())
{
}

I get an exception that says [System.ArgumentException] = "The specified store provider cannot be found in the configuration, or is not valid."

And the inner exception says InnerException = "Unable to find the requested .Net Framework Data Provider. It may not be installed."

Any thoughts as to whats going wrong?

1

1 Answer 1

2

In order to use Oracle as a provider you need to download and add the oracle ODAC package

You may want to review the tutorials located at Building .NET Applications Using Oracle Developer Tools for Visual Studio which will walk you through the required steps.

Basically the steps are:

  • Download and install ODAC.
  • Add Oracle.DataAccess and Oracle.ManagedDataAccess references to your project
Sign up to request clarification or add additional context in comments.

2 Comments

Just as added reference for anyone that reads this. I had to install the ODAC on the remote computers I was trying to run my program on. Even if you have the ODAC installed on the computer you are developing on, you need it on the computers you actually run the program on as well.
@RobertH, I wondered if you could take a look at my question here: stackoverflow.com/questions/29242527/…. Taking your advice I have ODAC installed, and am referencing Oracle.DataAccess v4.112.3.0 and Oracle.ManagedDataAccess v4.121.1.0 within my MVC5 application. I'm not sure how to proceed even after reviewing the linked tutorial above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.