Search code examples
c#windows-phone-8.1httpserverwindows-rt

Serve html files Windows Phone 8.1


I'm trying to run a StreamSocket to serve html, js, css and image files in order to present content that's been extracted from a zip file in my WebView (I'm developing with Windows Phone 8.1 Universal XAML apps)

I've tried to tweak the code that's in the question asked here https://stackoverflow.com/questions/21150024/in-process-http-server-dies-in-released-windows-8-app

But it's just not working, what I mean by that is nothing is being shown on the webview.

Is there a sample or has anyone tried doing this in Windows 8 RT or Windows Phone 8.1 apps?


Solution

  • You don't need to create your own webserver to display local files in a WebView.
    You can just pass the relative path of the html file you extracted from the ZIP.