keyongtech


  keyongtech > dotnet.framework.* > dotnet.framework.main > 03/2008

 #1  
02-29-08, 03:02 PM
archimago
I have an administrative program (installed by click-once) that starts/stops
a service running on the same machine.

The ServiceController class can check the status of the service, but as soon
as it attempts to start/stop the service on Vista which has UAC enabled (it
runs fine on XP and when UAC is disabled), I get this message:

Cannot open <servicename> service on computer <computername>. Access is denied

Presumably it's all about permissions. The application was installed as a
fully trusted click-once program, and is running under a user that has
administrative rights; the service is running under the LocalSystem account.

This is a very common scenario. Can someone point me towards a solution?
 #2  
02-29-08, 06:00 PM
Phil Wilson
I assume the issue is that it's irrelevant if you're an admin because you
still run with limited user rights, and apparently Vista elevation manifests
are not supported for ClickOnce web-deployed apps. See if this helps:

http://www.geektieguy.com/2007/08/25...-applications/
 #3  
03-01-08, 11:35 AM
archimago
You have it in one. Everything I have seen leads me to be conclude that
ClickOnce applications are not appropriate, if one wants to use something
like ServiceController under Vista. I updated the application manifest to use
enhanced rights, built a bootstrap rather than a ClickOnce installation, and
everything worked fine under Vista with UAC (albeit with the expected
prompts).

"Phil Wilson" wrote:
[..]
Similar Threads
ServiceController??

Howdy! I am trying to write an application that will control some services I am writing. However, in VS 2008 (VB) I don't appear to have the...

Q: ServiceController

Hi! I am using a ServiceController to start and stop my service. If i use the service localy and use the service controller it works fine. If i install the service on my...

Q: ServiceController and ExecuteCommand

Hi! I issue a ExecuteCommand, is there a way to get a response from the service when the command has been executed? What i want to do is to change an icon on the...

ServiceController.GetServices( other pc )

Hi, On the 1.1 framework I couldn't find a solution to get a list of services from an other PC. Only a list of services on My local PC. (witch is strange i guess, as you...

ServiceController

Dim myController As ServiceController myController = New ServiceController("myWrondName") i try : if myController is nothing then messagebox.show("This service doesn't...


All times are GMT. The time now is 05:58 PM. | Privacy Policy