title: How should connection string look like in web.config if you want to connect to SQLServerExpress with instance name mssqlserver2 in ASP.NET 4.5?
body: <p>I have a named instance of SQLServerExpress of mssqlserver2 </p>
  
  <p>And with the computer name first:</p>
  
  <pre><code>w7\mssqlserver2
  </code></pre>
  
  <p>But how should the connection string look like in web.config if you want to connect to SQLExpress to that server?</p>
  
  <p>This is for the logincontrols so it can create those tables.</p>
  
  <pre><code>&lt;!-- Not working connstring --&gt;
  &lt;add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-Site-20130227161535;Integrated Security=SSPI" /&gt;
  </code></pre>
  
  <p>Error mess></p>
  
  <p>Server Error in '/' Application.</p>
  
  <p><em>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.</em></p>