title: Entity Framework Connection String Not Valid For Role Provider?
body: <p>I've been trying to get roles working on my MVC 4.0 project.  I can query and update my database using my entity framework connection string.</p>
  
  <pre><code>&lt;add name="DataContext" 
       connectionString="metadata=res://*/Models.Model.csdl|res://*/Models.Model.ssdl|res://*/Models.Model.msl;
                         provider=System.Data.SqlClient;
                         provider connection string='data source=.\SQLEXPRESS;
                         initial catalog=Phase 2;
                         integrated security=True;
                         multipleactiveresultsets=True;
                         application name=EntityFramework'" 
       providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>This works fantastically.  The problem is when I try to set up my role manager it tells me I have an invalid connection string</p>
  
  <pre><code>&lt;roleManager enabled="true"&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="AspNetSqlRoleProvider" 
           type="System.Web.Security.SqlRoleProvider" 
           connectionStringName="DataContext" 
           applicationName="/" /&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  </code></pre>
  
  <p>This throws an error and tells me my connection string is wrong.  After researching apparently I have to use a separate connection string for my providers.  I have no idea how I would go about pointing two connection strings to the same context though.  </p>
  
  <p>This is how I currently have my Context being named.</p>
  
  <pre><code>public DataContext()
          : base("name=DataContext")
          {
          }
  </code></pre>
  
  <p>Is there a way to set the name dynamically or should I be looking for another way to do this.  </p>