I have console application (in .net 5) that runs as window service with a lots of class libraries.
for example, my service project that run the app:
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
services.AddMemoryCache();
}).UseWindowsService();
}
I need and also want to add webhook implementation that will listen to certain port and when receive an http message the webhook will handle it in my way.
how should I do it?
I can’t find any solution.