Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / July 2007

Tip: Looking for answers? Try searching our database.

Website that will allow a user to restart a service on another computer.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mufasa - 23 Jul 2007 12:53 GMT
I have a website that does all kinds of maint. functions for our systems.
One of the things I'd like to do is be able to restart a service that's on
another computer. Can somebody point me in the right direction to do that?

I think there may be issues of user privileges.

TIA - Jeff.
Kevin Spencer - 23 Jul 2007 13:30 GMT
The application will have to log on to the other computer using an account
with the necessary priveleges.

Signature

HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

>I have a website that does all kinds of maint. functions for our systems.
>One of the things I'd like to do is be able to restart a service that's on
[quoted text clipped - 3 lines]
>
> TIA - Jeff.
Fred Mertz - 23 Jul 2007 14:52 GMT
Take a look at the ServiceController class. It is there to enable us to
programmatically access and control Windows services. One overload lets you
specify both the service and machine
(http://msdn2.microsoft.com/en-us/library/ssbk2tf3.aspx)

-HTH

>I have a website that does all kinds of maint. functions for our systems.
>One of the things I'd like to do is be able to restart a service that's on
[quoted text clipped - 3 lines]
>
> TIA - Jeff.
Ignacio Machin ( .NET/ C# MVP ) - 23 Jul 2007 15:05 GMT
Hi,

>I have a website that does all kinds of maint. functions for our systems.
>One of the things I'd like to do is be able to restart a service that's on
>another computer. Can somebody point me in the right direction to do that?
>
> I think there may be issues of user privileges.

You can use ServiceController to control a service. Of course you need your
app to have admin. priv. You can do so by impersonate.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.