title: Entity Framework Connection String Trouble
body: <p>I am making a little library(DLL) to manage users and their roles/privileges.  The plan is to be able to add this dll to an MVC project and be able to manipulate users/roles/etc.  All the data resides in a SQL db.</p>
  
  <p>I am using entity framework for data access.</p>
  
  <p>So when I initialize a new RoleManager(this is the name of the main class in the lib I'm making) I supply it with a connectionString like so:</p>
  
  <pre><code>RoleManager roleManager = new RoleManager(string connectionString);
  </code></pre>
  
  <p>Then inside the constructor I do this:</p>
  
  <pre><code>db = new RoleManagerEntities(connectionString); //This is the EntityFramework
  </code></pre>
  
  <p>And I am trying to supply this connection string (among many others)</p>
  
  <pre><code>"metadata=res://*/RoleManager.csdl|res://*/RoleManager.ssdl|res://*/RoleManager.msl;provider=System.Data.SqlClient;provider connection string='Data Source=localhost;Initial Catalog=Login;Integrated Security=True;Connection Timeout=60; multipleactiveresultsets=true'"
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <pre><code>The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
  </code></pre>
  
  <p><strong>This question is a result of having trying to instantiate the EF from my new project without supplying a connection string and without having anything inside my app config for it to default to.  Too bad I can't delete it now.</strong></p>