How to make Topshelf work as a domain user

How to make Topshelf work as a specific domain user account? I have in the configuration

x.RunAs("domain\username", "password"); 

I have a console operator in the code that displays the Windows identifier in which this process works. This is not the one I pointed out.

+4
source share
1 answer

The code you provided is the correct method for applying the user. This includes several things ...

  • This only works for Windows services, if you run it as a console application, it will still work as you
  • All complete processes run as a host user, so the shelves ignore any user settings.
  • You can double-check the user for whom the service is registered, for example, by going to services in mmc, find your service, go to the properties panel and on the "Login" tab, which displays the user to whom the service should work.

If you just use the console application, just servicename install start and it should work as the user for whom it was configured.

If this does not help, please visit the http://groups.google.com/group/topshelf-discuss mailing list.

+2
source

All Articles