Multimobile Development: Building Applications for any Smartphone
Starting and Stopping Services running in Remote machine
Messages   Related Types
This message was discovered on microsoft.public.dotnet.myservices.


SenthilVel
hi all
Is it possible to start and stop services which are running in remote
machine.

I do wanted to create a Windows/web application from which i can stop and
start services in machines which are in my network.

how to go about this ?

,,,,,
Senthil

Reply to this message...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
Lee Gillie
Use System.ServiceProcess.ServiceController

SenthilVel wrote:
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
First volume of Multimobile Development nearly ready to go to press
A mention on Developing for the iPhone and Android: The pros and cons
 
    
SenthilVel
Hi Lee

I used the System.ServiceProcess.ServiceController namespace ....
this is working fine when i run my code in a windows application .

But when i use the code to start /Stop the service in a aspx page i get an
error like:

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: Access is denied

so what must i do in settings or in permission levels so that i can run the
service start/stop code in ASPX pages??

,,,,
Senthil

"Lee Gillie" <Click here to reveal e-mail address> wrote in message
news:#797v$Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
Lee Gillie
In a Windows Application you are logged in under your own username, and
have all of your own rights and privileges.

In ASPX you are logged in under the username the IIS service (or
possibly proxy) is logged in. ASPX is not my forte, and you may be
better to go to that group, or IIS security, etc.. But fundamentally
the service controller facility does what you want, on the local, or on
a remote machine, provided you have the privilege. Consider: Do you
want ANY anonymous web user to be able to stop/start services in your
LAN? Check out ASPX authentication documentation.

- Lee

SenthilVel wrote:

[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
First chapters of Multimobile Development book now available on Apress Alpha program
iPad
 
    
SenthilVel
Hi Leee

I used the impersotantion for my aspx pages with the windows account and now
i am able to control the services.

Thanks
,,,
Senthil

"Lee Gillie" <Click here to reveal e-mail address> wrote in message
news:#Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
New book project – Multimobile Development: Building Applications for any Smartphone
Dive into HTML5
 
 
System.ComponentModel.Win32Exception
System.ServiceProcess.ServiceController




Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734