Results 1 to 1 of 1

Thread: The underlying provider failed to open Entity Exception

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2009
    Posts
    230

    The underlying provider failed to open Entity Exception

    I've installed VS 2012 Pro followed by SQL Server 2012 Express. I then joined one solution to another so they share the same APP_DATA folder. Both projects have SQL server mdf databases in the APP_DATA folder (created before I installed SQL Server 2012 instance).

    In a class library project for one of these websites, I added an Entity Manager Model and data access file. For some reason the data access file couldn't locate the connection string, so I added the the connection string from the app.config in the class library to the web.config file for that website. Unfortunately, now I get the following error:
    The underlying provider failed to open Entity Exception.

    Here is the connection string from the web.config :

    <connectionStrings>
    <add name="OrchidFamilyDBEntities" connectionString="metadata=res://*/OrchidFamilyModel.csdl|res://*/OrchidFamilyModel.ssdl|res://*/OrchidFamilyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(LocalDB)\v11.0;attachdbfilename=|DataDirectory|\OrchidFamilyDB.mdf;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    </connectionStrings>

    Why am I not able to connect to the database?

    Thanks in advance!
    Last edited by garry79; Oct 24th, 2012 at 03:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width