ServiceController AccessDenied exception
From: Strider (anonymous_at_discussions.microsoft.com)
Date: Mon, 3 Nov 2003 06:39:13 -0800
The command ID parameter should be an integer value
between 128 and 256. Values less than 128 are reserved
by the operating system.
Funny how the .NET Framework class library documentation
doesn't mention this!
>I have created a Windows Service and now I'm trying to
>develop a controller application for my service.
>So, I created a Windows.Forms project, I added a
>System.ServiceProcess.ServiceController component on my
>form and I hooked it up to my service.
>The start and stop commands work just fine, but when I
>try to invoke a custom command on my service using the
>ServiceController.ExecuteCommand method, I get the
>"System.InvalidOperationException: Cannot control
>MyService service on computer '.'. --->
>System.ComponentModel.Win32Exception: Access is
>I guess it has something to do with the services
>settings or my code's access permissions.
>Thanks in advance.