I had a problem with a Windows service running under NT AUTHORITY\LOCAL SYSTEM , in which the service could not connect to the database.
Login failed for user 'NT AUTHORITY\LOCAL SERVICE'. Reason: Failed to open the explicitly specified database.
The only difference between the connection string specified for this particular service and another service running under the same account was that the providerName attribute was missing. As soon as i added
providerName="System.Data.SqlClient"
to the connection string to which the service can access the database. Can anyone explain why this would be? I thought System.Data.SqlClient is the default provider.
source share