title: SQL ERROR: Verify that the instance name is correct and that SQL Server is configured to allow remote connections?
body: <p>I am getting following error while connecting to my local Sql Express:</p>
  
  <blockquote>
    <p>An error has occurred. Details of the exception:<br>
    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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)<br>
    Unable to connect to SQL Server database.</p>
  </blockquote>
  
  <p>I am able to connect to Sql Server using Management Studio.</p>
  
  <p>I am using aspnet_regiis to generate the Session state database using the following command.</p>
  
  <pre><code>aspnet_regsql.exe -ssadd -sstype c -d App_SessionState -S [.\SQLEXPRESS] -U [USERiD] -P [Password]
  </code></pre>