I try installing my Windows service using InstallUtil.exe and running my command prompt as Administrator.
InstalUtil.exe WindowsService.exe /ShowCallStack
The above command opens a 'Set Service Login' window, see the picture at this link.
When I enter 'Jasper Catthoor' in the username field (my account name) and my windows password in the password fields, I get the following error:
System.ComponentModel.Win32Exception: The trust relationship between the primary domain and the trusted domain failed.
When I enter as username 'jasper@catthoor.com' (email of my account, see previous picture), I get the following error:
System.ComponentModel.Win32Exception: The specified domain either does not exist or could not be contacted.
By entering a random username I receive the same error as when I enter 'Jasper Catthoor'. By entering a random email (with an @ sign), I receive the error:
System.ComponentModel.Win32Exception: No mapping between account names and security IDs was carried out.