Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use ASP.NET Core Web API without IIS in a Windows Desktop application?

Currently I'm trying to find a way to build a desktop app that hosts a browser window and uses JavaScript to communicate with a local ASP.NET Core Web API as the "backend":

enter image description here

All my searches lead to the suggestion that I should use IIS Express web server.

Unfortunately, IIS Express does not fit into my scenario, since I want the whole application to be installable and runnable by non-admin users.

Since IIS Express requires administrative permissions to install, this is out-of-scope to me.

My question:

Is there another way beside using IIS Express to run an ASP.NET Core Web API project?

I've read about the Kestrel server which seems to be what I am looking for, but I still don't get the big picture here.

Edit 1:

I've asked a somewhat releated question over at SE Software Recommendations.

like image 262
Uwe Keim Avatar asked Aug 11 '16 21:08

Uwe Keim


People also ask

Does ASP.NET Core require IIS?

IIS and ASP.NET Core The most important thing to understand about hosting ASP.NET Core is that it runs as a standalone, out of process Console application. It's not hosted inside of IIS and it doesn't need IIS to run.

Does the ASP.NET Web API ability to both self hosting and IIS?

ASP.NET Web API does not need to always be hosted in IIS. You can host them in a separate process by creating a host application. Such a self-hosting is typically done using a Console application or a Windows application.

Can we run an ASP.NET Core application without using the built in Kestrel Web Server?

YES. When we use the InProcess Hosting model, then the application is hosted inside the IIS worker process i.e. w3wp.exe in the case of IIS and iisexpress.exe in the case of IIS Express. That means the Kestrel Web Server is not used with the InProcess hosting model.


1 Answers

I'm sure Kestrel will work well for you in this situation. It's a cross platform web server which is based on libuv which means it is super fast. The official benchmarks show just how much it outperforms standard IIS.

like image 200
DavidG Avatar answered Oct 18 '22 13:10

DavidG