I prepared WinForms App and migrate it to .NET 6, and then follow answer from this question: Hosting ASP.NET Core API in a Windows Forms Application
How I will change app to allow connect to api from devices in LAN network?
i tried something like this:
var host = CreateWebHostBuilder(args)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseUrls("http://localhost:5000", "http://aError:5000", "http://0.0.0.0:6000")
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
But i can still from my PC connect to local host, aError not working.