Avatar of Kamal Khaleefa
Kamal Khaleefa
Flag 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
ASP.NETVisual Basic.NET.NET Programming

Avatar of undefined
Last Comment
Kamal Khaleefa

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Chinmay Patel

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Kamal Khaleefa

ASKER
Thank you it give a hint to workaround
Your help has saved me hundreds of hours of internet surfing.
fblack61