Web server

Using the built-in web server on each Windows 10 device

All this month, I’m taking time every day to explore (and document) things related to UWP development that I haven’t fully studied or used before. By doing it over lunch each day, I call it #UWPLunch. Just a few weeks ago I was thinking to myself If Windows 10 has an embedded web server to host the remotely accessible device portal, can I also use it for my own functionality?

I was curious if it was possible to use any Windows 10 device as my own web server.

Although this is not possible, something related has been announcement last week and it’s the Windows Device Portal Wrapper Project.

It works if you activate the portal after enabling developer settings.

The idea is that it allows you to easily write an app that can query the device status or perform certain actions. The most interesting actions are probably installing or uninstalling other applications. This could provide an interesting tool for managing a small number of devices where more formal MDM solutions are too expensive or too complex.

Originally I was wondering if this might be a way to possibly add some extra functionality to the portal, but upon reflection it’s not necessary and not the best way to go about it.

Originally, I thought of the portal as a way to turn any device into a web server. But not all devices need to be a web server. If you need a web server, forcing an arbitrary device to act like one probably won’t get you the best results. Use tools / devices appropriate to the task.

I also wondered if the portal could become a generic way to access extension features for an installed app. I was thinking of this as a way to do things like extract log files from an app on a remote device. Now I wonder if this is too specialized a task. For applications where it is appropriate this could, I think, be achieved with remote messaging of the connected applications. (This is something I hope to review later this week.)

Maybe more things will become possible with the portal (and the wrapper project) in the future, but at the moment I don’t think that’s part of my app development plans.

Leave a Reply

Your email address will not be published.