Link to home
Start Free TrialLog in
Avatar of Kamal Khaleefa
Kamal KhaleefaFlag for Kuwait

asked on

windows service in asp.net

hi
i need to make a system in .Net to access the service SDRSVC  (Windows backup)
and to see when was the last backup done or when this service was running last time
or if there is any failure

i try this code
  Dim services As ServiceController() = ServiceController.GetServices()

            Response.Write("List of running services : <BR>")
            For Each service As ServiceController In services


                If service.ServiceName = "SDRSVC" Then
                    Response.Write(String.Format(" Service Name: {0} , status {1} <BR>", service.ServiceName, service.Status.ToString()))

                End If


            Next

Open in new window


but i dont know how to access the properties of when it was last running ...etc

Please help
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kamal Khaleefa

ASKER

Thank you it give a hint to workaround