asp.net - Hot to get the status of a Windows service in ASP / .net? -


I have to find a way to monitor the status of the list of Windows services on HTTP, without any third party program) .

The service name and its status ('start' / 'stop') should be able to actually do it.

I am not an ASP programmer. It is slightly out of my scope. I have searched and have not yet found any.

Any help or suggestion is appreciated.

  using the system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Using System.Web.UI; Using System.Web.UI.WebControls; Using System.ServiceProcess; Public Partial Class _Default: System.Web.UI.Page {Secure Zero Page_load (Object Sender, EventArgs e) {ServiceController [] services = ServiceController.GetServices (); reaction. Type ("List of Moving Services: & lt; BR & gt;"); (Service controller service in service) (reverse.white (string format ("service name: {0}, status {1} 
", service.sevenum, service status.tostring ()) );}}}

Just remember to add the system.serviceprocess reference


Comments