Reputation: 175
How do I get Topshelf to run as a specific domain user account? I have in the configuration
x.RunAs("domain\username", "password");
I have in the code a console statement that prints out the Windows Identity that the process is running under. It is not the one I specified.
Upvotes: 4
Views: 4467
Reputation: 10547
The code snip-it you indicated is the correct method to apply a user. A couple of things apply to this...
If you are just running as a console app, just servicename install start
and it should be running as the user it's been setup for.
If this doesn't help, reach out on the mailing list http://groups.google.com/group/topshelf-discuss.
Upvotes: 3