DEV Community

loading...
Cover image for How to embed a web server inside desktop applications

How to embed a web server inside desktop applications

zeppaman profile image Daniele Fontani 惻1 min read

In this article, we will see how we can embed a web server inside a desktop application. This is done using asp.net core and a WPF application, but the same experience can be ported to a Windows Form or console application without any big difference. This is a very unusual scenario, as we usually have a client that connects to the API, and both are in a different place. Anyway, there are situations where integrating a visual UI with a web server to a client may be useful. Iā€™m thinking about embedded devices that have to be controlled remotely or a workstation that wants to share data, but Iā€™m sure you have more imagination than me and you already found more interesting use cases šŸ˜ƒ

For example, I used this situation for creating jSOS, a general-purpose API system for extending javascript capabilities, for example adding direct printing or file system access. The result is hosted on Github and it is a fully working application. Curios? Well, I will use this project as a use case to explain how to configure a WPF application for acting as a webserver!

Read the article

Discussion (0)

Forem Open with the Forem app