I have one WPF application and one windows service as watch dog.
I want to check if my window application is halt or working fine. If it is halt i want to restart the application.
I see Process.responding property but it is not working in my service.
Any idea or other solution.
Process[] myProcesses;
myProcesses = Process.GetProcessesByName(ApplicationName);
if (myProcesses.Length > 0)
{
foreach (Process proc in myProcesses)
{
_Logger.LogMessage("Check responding");
if (!proc.Responding)