Erich Freimann
Erich Freimann

Reputation: 1

Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database 'icare'. [CLIENT: <local machine>]

I programmed a simple Console connection to a MSQL Database which works fine. Now I want to do it as a service to frequently check the database but the service cannot open the specified database.

My connection string which i use same in the Console and Service App

private readonly string connectionString = @"Data Source = localhost\SQLEXPRESS; Initial Catalog=icare; Trusted_Connection = True";

Not really sure what to do it's more or less the same just one is a service

I tried to change the service Log On to Local System or Network Service tried to change the connection string from Trusted_Connection to user and pwd adding port 1433 all useless just get different error messages

Upvotes: 0

Views: 126

Answers (0)

Related Questions