I have a service that receives events by TCP running, the problem is that when an exception occurs the application is blocked, what I want is that when this exception occurs, I restart the service.
using System;
using Logic;
namespace TestsConsole
{
class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Servicio Iniciado");
ServicioBll servicioBll = new ServicioBll();
servicioBll.Start();
Console.Read();
servicioBll.Stop();
}
}
}
This is the image of the exception.