title: The login failed. Login failed for user 'NT AUTHORITY\NETWORK
body: <p>I can't get rid of this error. I have added the "NT AUTHORITY\NETWORK" user via SSMS, along with the relevant roles using this thread as reference: <a href="https://stackoverflow.com/questions/2251839/login-failed-for-user-nt-authority-network-service">Login failed for user &#39;NT AUTHORITY\NETWORK SERVICE&#39;</a></p>
  
  <p>I am trying to make a db connection via a Windows Service. In debug mode the DB connection works fine. When I actually try and run the installed service is when I get this error.</p>
  
  <p>Here is my connection string from the app.config:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;remove name="LocalSqlServer" /&gt;
      &lt;add name="LocalSqlServer" connectionString="Data Source=(LocalDb)\v11.0; database=MyDB; Integrated Security=True;" /&gt;
      &lt;remove name="SqlServer" /&gt;
      &lt;add name="SqlServer" connectionString="Data Source=(LocalDb)\v11.0; database=MyDB; Integrated Security=True;" /&gt;
      &lt;remove name="SqlServer" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I also tried with adding <code>User ID=myDomain\myUsername;</code> to the connection string, but that didn't help. </p>