3

Is there a way to start / stop a windows service of a server in a different network

(not \\<server name>) from an asp.net page?

I tried using ServiceController but it's only work if it's in the same network.

Aristos
  • 66,005
  • 16
  • 114
  • 150
IlanKogan
  • 137
  • 1
  • 9
  • Possible duplicate of [How to Start/Stop a Windows Service from an ASP.NET app - Security issues](https://stackoverflow.com/questions/818512/how-to-start-stop-a-windows-service-from-an-asp-net-app-security-issues) – Patrick Hofman Dec 10 '18 at 09:28
  • Or even better duplicate: https://stackoverflow.com/q/12893735/993547 – Patrick Hofman Dec 10 '18 at 09:29

1 Answers1

5

RE: ServiceController How to Start/Stop a Windows Service from an ASP.NET app - Security issues

Anything you can do from command line or powershell can be ran from a page (assuming the app pool user has correct permissions etc)

Powershell is probably your best bet for managing services on a remote server though this will require the server to allow remote powershell.

and of course for the topic of powershell resetting/stopping remote services.

Google is definitely your friend on this one :)

Community
  • 1
  • 1
Chris McKee
  • 4,298
  • 10
  • 48
  • 83
  • This is a post consisting of links instead of content, and that is discouraged since it adds little to no value for future visitors. Please update your answer to highlight the key parts from the references. – Patrick Hofman Apr 29 '16 at 11:02
  • @PatrickHofman I'd disagree as 6 of those links are on stackexchange; adding the contents of other posts would cause duplication whilst losing the context. – Chris McKee Apr 29 '16 at 11:05
  • I understand. Please read [this post](http://meta.stackexchange.com/q/225370/245360). – Patrick Hofman Apr 29 '16 at 11:07
  • 2
    @PatrickHofman we'll have to agree to disagree as this is from 3 years ago and frankly I don't care; if you want to provide the contents of other posts as an answer to a vague question feel free. – Chris McKee Apr 29 '16 at 11:12
  • @PatrickHofman I think sharing links is also helpful and sometime is a better answer – Mohammad Fahmawi Dec 10 '18 at 09:27