Last post Apr 18, 2017 08:50 PM by Dmitry Sikorsky
Apr 18, 2017 04:55 PM|lkeene|LINK
Hello. I've written an ASP.NET Core Web API as a service for a desktop client I'm writing. I intend to publish it as a self-contained .NET Core app and just copy the folder over to the host computer. When I launch my WPF client I would like the web api to
start as well. Is there a way for the desktop client to launch the server, specifying the port the server should start listening on?
Apr 18, 2017 08:50 PM|Dmitry Sikorsky|LINK
It is very easy task. To start the asp.net core application you only have to execute few commands:
cd "path to your application"
You can execute them from the C# application using this code:
Process.Start("your commands or bat file");
(In your case I think you will have the exe file? But the solution is the same.)