Start/Stop Window Service from ASP.NET page

2019-07-09 20:21发布

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.

1条回答
Anthone
2楼-- · 2019-07-09 20:50

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 :)

查看更多
登录 后发表回答