C ++ / CX HTTP Web Server for Windows Store App

I need to run an HTTP server in a Windows Store application written in C ++ / CX and XAML. I am implementing the WinRT version of Readium (ePub reader, here's a link to the MFC version for reference ). The MFC version uses Microsoft Sample HTTP Server , but this is not compatible with WinRT sadly.

Googling does not detect embedded HTTP servers for C ++ / CX, so I will ask directly: does anyone know an HTTP server written in C ++ / CX?

If the C ++ / CX server doesn't have a server written in another WinRT language (like C #) that can interoperate with C ++ / CX?

+3


source to share


1 answer


I have never been able to find an HTTP server that will run in a WinRT application, although I believe it is technically possible. However, it turned out that I didn't need a full HTTP server as Windows WebView

has a method called NavigateToLocalStreamUri that allows me to manually handle requests for files in WebView

(e.g. images, stylesheets) and return them in WebView

, similar to how it would work HTTP server.



MSDN provides a simple example that resolves an HTML page image to WebView

.

+2


source







All Articles