title: Can't connect to local SQL Server Express
body: <p>I've switched from AzureDb to a local SQL Server Express instance for my project. I can connect to the instance using Management Studio and see that the server is the usual <code>.\sqlserver</code> with <code>sa</code> and a dummy password. The actual database isn't created yet but I can access the server and see system databases as well as create logins.</p>
  <p>However, trying to perform a migration database update, I get the following error.</p>
  <blockquote>
  <p>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: SNI_PN11, error: 26 - Error Locating Server/Instance Specified)</p>
  </blockquote>
  <p>Naturally, I suspected something with my connection string (which I still do).</p>
  <pre><code>&quot;ConnectionStrings&quot;: { ...
     &quot;SqlServer&quot;: &quot;Server=.\\sqlserver;Database=Blopp;Uid=sa;Pwd=Abc123();&quot;
  }
  </code></pre>
  <p>I've tried all the usual variations - single backslash, quadrupple backslash, forwardslash, at-char in the beginning, (localhost) instead of dot, computer name instead of dot etc. I'm out of ideas what else it might be. I've tried creating the DB manually. I tried using caps (although I know it's case insensitive). Nothing helped...</p>
  <p>Proof of the usual effort: <a href="https://stackoverflow.com/a/41043358/1525840">here (SO)</a>, <a href="https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15#connect-to-the-automatic-instance" rel="nofollow noreferrer">here (MSDN)</a>, <a href="https://stackoverflow.com/a/5283812/1525840">here (SO)</a>, <a href="https://stackoverflow.com/a/5283762/1525840">here (SO)</a>, <a href="https://www.hanselman.com/blog/fixing-instance-failure-when-connecting-to-sql-server-2005-express" rel="nofollow noreferrer">here (Hanselman)</a>, <a href="https://stackoverflow.com/a/35682224/1525840">here (client protocol/service running)</a>.</p>
  <p>What on earth am I missing?</p>