0

I have 2 web apps:

  • UI in React JS
  • API using ASP.NET Core MVC

They work fine when hosted on IIS, but I need them working on a local computer as a part of the standalone desktop app that doesn't have access to the internet. React app will be pre-compiled as HTML and displayed in a WebView2 component. As about starting servers, I thought that I could call CreateHostBuilder from WPF, but decided to ask for recommended approach in this case.

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services

The question

How to

  • Start UI server
  • Start API server
  • Start WPF and point WebView / Browser control to UI server

Bonus point, if these servers will not be available from a regular web browser installed on this computer, only from WPF WebView.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Anonymous
  • 1,823
  • 2
  • 35
  • 74
  • Sounds like you need Electron to me. – JWP Jun 14 '20 at 02:32
  • The ASP.NET Core app is actually a console app that you can launch as a hidden process in the background, and via `--urls` switch you can ask it to listen to a local port, https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1#endpoint-configuration – Lex Li Jun 14 '20 at 03:51

0 Answers0