Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manipulate a service on aother computer using asp.net

Status
Not open for further replies.

JasmineT

Programmer
Apr 16, 2003
2
JM
i need to start and stop a service on a machine on the network using the ServiceController class. i can do it on the local machine using a code like this to test a service public void testServices(Object src, EventArgs e)
{
/*System.ServiceProcess.ServiceController myController = new System.ServiceProcess.ServiceController("iisadmin");
myController.MachineName="myMachineName";
if(myController.CanStop)
{

Response.Write(myController.DisplayName+" can be stopped.");
}
else
{

Response.Write(myController.DisplayName+" cannot stop.");
}*/

}

but if i specify another machine name it says access denied.
what can i do?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top