Note that there are some explanatory texts on larger screens.

plurals
  1. POData Entities Connection String Problem
    primarykey
    data
    text
    <p>I must have changed something somewhere, but damned if I can figure out what it is.</p> <p>I have a DAL that handles all my data access (as is a DAL's wont) to my SQL Server DB. This includes the Entity Model, the repository classes and the connection string in the App.Config file.</p> <p>Somewhere along the piece, I must have changed something and am now getting the following exception every time I try to view a page on my MVC application:</p> <blockquote> <p>The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.</p> </blockquote> <p>This is any page that inherits <code>&lt;IEnumerable&lt;DataAccess.Layer.Class&gt;&gt;</code>. What am I missing?</p> <p><em>Connection String:</em></p> <pre><code>&lt;add name="JobTrackEntities" connectionString="metadata=res://*/JobTrackDataModel.csdl|res://*/JobTrackDataModel.ssdl|res://*/JobTrackDataModel.msl;provider=System.Data.SqlClient;provider connection string='Data Source=.\SQLEXPRESS;AttachDbFilename=&amp;quot;C:\Users\Phil\Documents\Visual Studio 2010\Projects\JobTrack\trunk\JobTrack\App_Data\JobTrack.MDF&amp;quot;;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True'" providerName="System.Data.EntityClient" /&gt; </code></pre> <p><em>Designer.cs snippet:</em></p> <pre><code>public JobTrackEntities() : base("name=JobTrackEntities", "JobTrackEntities") { this.OnContextCreated(); } /// &lt;summary&gt; /// Initialize a new JobTrackEntities object. /// &lt;/summary&gt; public JobTrackEntities(string connectionString) : base(connectionString, "JobTrackEntities") { this.OnContextCreated(); } /// &lt;summary&gt; /// Initialize a new JobTrackEntities object. /// &lt;/summary&gt; public JobTrackEntities(global::System.Data.EntityClient.EntityConnection connection) : base(connection, "JobTrackEntities") { this.OnContextCreated(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload