Pls. forgive me if I picked the wrong forum
Ref: Visual Studio 2008 (C#), windows application project for a Win2003 domain environement.
Im having a problem with System.ServiceProcess.ServiceController class if I want to run this under an alternative user credentials, It seems not be a simple way to do this.
If possible I would like to use the ServiceController class because it provides really nice implementations for handling all needed operations when it comes to operate Services, especially dependencies.
I've tested it running as a member of Domain admins and it works great, much esier than using WMI (ManagementObject...)
On the other hand, WMI provides a way to "run as" by adding a ConnectionOptions to the Scope object
I also tried Impersonation using a class created on the article
The impersonation process works, but now the ServiceController failes due to privileges!?! and I was impersonating the domain Administrator himself. Exception is: System.InvalidOperationException, Text: Cannot open Service Control Manager
on computer 'TESTPC'. This operation might require other privileges.
So my quest
View Complete Post