A
A
Alex45G2016-04-27 13:01:10
C++ / C#
Alex45G, 2016-04-27 13:01:10

Why can't windows service connect to ms sql database?

Good afternoon!
I wrote a service in c# windows service. It should write to a database table on ms sql. The service was published on his computer by BATMAN with the parameter account = Local System in the service installer. Published by running the developer console as an administrator.
Bottom line: the service is running, writing logs, but in the logs in the place where the service should establish a connection to the database: Login error for user "<domain>\BATMAN$".
The database to which the service is trying to connect is located on the server (another computer). All permissions are there, I tried to connect to the same database and write there simply from a regular project.
The user from which I connect to the database is not tied to the windows account in any way, from this user you can connect to the database from any computer on our local network. I also tried from my user, which is tied to windows, the same thing.
Tell me, please, what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergix, 2016-04-27
@Alex45G

Perhaps windows authorization, enable authorization from under sa ... If you thought so.
At service probably it would be worth making Network service. Check whining whether TC IP is enabled (but since authorization is most likely the case in the first)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question