How to allow window background service to access SQL Server database?
I have background service which access my SQL Server database开发者_运维问答.
My background service working fine when I try to get a row from SQL Server database I get an exception
base {System.Data.Common.DbException} = {"Cannot open database \"test2\" requested by the login. The login failed.\r\nLogin failed for user 'NT AUTHORITY\LOCAL SERVICE'."}**
test2
is my database name.
How do I allow my background service to access SQL Server database?
grant user NT AUTHORITY\LOCAL SERVICE
access to the database
精彩评论