c# - .NET Windows Service Username -



c# - .NET Windows Service Username -

i have windows service created .net 4.5. needs run under context of domain user business relationship (service account) connect sql server using trusted connection. in vs2013 set projectinstaller utilize business relationship type "user."

when install , start service first time prompts username , password. expected since haven't stored anywhere find annoying anytime service stopped , started, continues inquire username , password.

i assume (haven't been able verify) if service stops , set automatically restart, wouldn't able automatically restart because need username , password.

is there solution issue, perchance adding username , password installer?

it doesn't sound great thing embed domain business relationship credentials service installer.

the next properties should help you

account: user business relationship context in service runs accounttype: when set automatic, when machine reboots, service started part of boot

if service has been installed, can navigate local services command panel, right click on service list, , go properties. "logon" tab allows specify business relationship service runs as.

additional references:

account property of service installer: http://msdn.microsoft.com/en-us/library/system.serviceprocess.serviceprocessinstaller.account(v=vs.110).aspx service installer: http://msdn.microsoft.com/en-us/library/ddhy0byf(v=vs.110).aspx

c# windows-services

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Php operator `break` doesn't stop while -