SQL Server Express login failed for user domain\name
<p>I created a c# program with the connection string </p>

<pre><code>Server=.\SQLExpress;AttachDbFilename=|DataDirectory|APSDB.mdf;Database=APSDB; Initial Catalog= APSDB; Trusted_Connection=True; User Instance=true;
</code></pre>

<p>It works using the computer I created it with, but upon using Advanced Installer and deploying it to my laptop to test if it works on a different environment, it utterly fails. The program runs, but once I do anything that accesses the database, it gives me the error: </p>

<blockquote>
  <p>login failed for user domain\name.</p>
</blockquote>

<p>I have checked the SQL Server Error Log, there is no Error 18456, State 38 anymore. It just says:</p>

<blockquote>
  <p>2016-08-24 17:32:03.57 spid69s     Starting up database ‘APSDB’</p>
  
  <p>2016-08-24 17:32:03.57 spid69s     [INFO] HkHostDbCtxt::Initialize(): Database ID: [6] ‘APSDB’. XTP Engine version is 0.0.</p>
  
  <p>2016-08-24 17:32:03.57 spid69s     [INFO] HkHostDbCtxt::Initialize(): Database ID: [6] ‘APSDB’. XTP Engine version is 0.0.</p>
  
  <p>2016-08-24 17:32:03.57 spid69s     [INFO] HkHostDbCtxt::Initialize(): Database ID: [6] ‘APSDB’. XTP Engine version is 0.0.</p>
</blockquote>

<p>Upon changing the account SQL Server Express is using to start to my Local System, and re-run everything, on the error log it says that:</p>

<blockquote>
  <p>Login Succeeded for User domain\name</p>
</blockquote>

<p>but alas, the problem persists with my program.</p>