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: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
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.
Here is my connection string from the app.config:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=(LocalDb)\v11.0; database=MyDB; Integrated Security=True;" />
<remove name="SqlServer" />
<add name="SqlServer" connectionString="Data Source=(LocalDb)\v11.0; database=MyDB; Integrated Security=True;" />
<remove name="SqlServer" />
</connectionStrings>
I also tried with adding User ID=myDomain\myUsername; to the connection string, but that didn't help.