Wow, that took forever. Sorry about that! I spent a chunk of that time on vacation, but mostly I was doing a *lot* of behind-the-scenes hacking. The visible changes in this version aren't so great (and I can't promise I haven't introduced a regression or two, though I did try to test things) but this should unblock progress on other features I've wanted to add for ages.
In the meantime, this version fixes a number of issues: .REG download on all browsers should (hopefully!) now work, the server should hold fewer threads and connections open, the server should shut down faster (not a *huge* concern, I know, but it was an easy fix and it annoyed me how long you had to wait), IPv6 addresses are now both displayed properly in the link bar, and are also subordinate to IPv4 addresses; you'll only see a v6 if you don't have a v4 WiFi address at all. I've improved the error reports for various edge cases where the request parser fails; this probably won't matter (Ever seen an HTTP 505? Yeah, me neither). Page templates are slightly smaller, rely less on JS and more on HTML5, and (unfortunately) still render kind of awfully on mobile. One of these days...
Previous update (0.5.3): The major change this time is the addition of a button to download a registry key (including all its subkeys, and of course all their values) as a .REG file. Other changes include better handling of relative paths and path traversal in the file system, a "go up" link in the registry, and bugfixes on some of the more esoteric registry behaviors. Oh, and the ability to open the phone's web browser, pointing at the server, from within the app (the URL is now a link).
PLEASE REPORT ANY BUGS YOU FIND IN THE CURRENTLY IMPLEMENTED FEATURES, ESPECIALLY THE NEW ONES! I'll try to fix newly reported issues much faster this time!
I have added a support / Q&A thread here: http://forum.xda-developers.com/wind...hread-t2906882. Please use that thread to report questions; don't PM me unless it needs to be kept private for some reason!
KNOWN BUGS: Occasionally, the server closes the connection without actually returning the page first. I have no idea why; I spent hours tracing in the debugger and never caught it. Refreshing the page usually works, if that doesn't do it, just bounce the server.
ISSUES ON WP8.1:
- You may be unable to run the app if you deploy it using "Application Deployment". Instead, deploy with "Windows Phone Application Deployment 8.1".
- Problems have been reported in the past when the app is installed to the SD card. It's small, though; putting it on internal storage shouldn't be a problem.
IN CASE OF OTHER ISSUES: Please provide a *detailed* error report - what phone and OS version you have, what hacks you've installed, what Webserver version you're running, what you do to get the error to occur, and exactly *what* occurs - and I'll fix it as soon as I can!
I still plan to implement upload/write operations, hopefully soon! I'm also looking at moving the server to a background process and making the app just a control UI for it, adding support for authentication and/or HTTPS, adding some stylesheets to the web UI, adding cache and connection control, and much more.
As with the last few releases, the XAP is published twice; once as a fairly standard XAP that any phone can sideload, the second with many exotic capabilities to enable viewing of slightly more of the file system. The standard XAP has had its list of capabilities expanded to pretty much all of them that can be used without interop-unlock. The high-capability variant requires not just interop-unlock, but the additional capability-unlock hack available in the interop-unlock thread.
An item of note: the AllCapabilities version can open other drives in the file system. On phones with an SD card, it is mounted at D: and you can browse it as normal. Credit to @hjc4869 for this discovery!
Version 0.5.5 is mostly a ton of updates to the HttpServer code (currently its version number is at 0.4.1, vs. the old 0.3.7). Please see the BinaryServer branch in Git if you want to follow what I'm doing there and maybe try out bleeding-edge code (I can't really recommend it; I mean, I try not to check in broken code but it doesn't exactly get tested).
DESCRIPTION: This is a simple webserver app which can enumerate those files that are in folders readable from the sandbox, can download files, can browse the registry, and can display the contents of registry values of any type. It runs on WP8.x only. It is a spiritual successor to the Functional Webserver / WebServer (Mango) projects from WP7. This version is still missing a lot of functionality as I decided to implement it from scratch, but it is advancing swiftly. Note that there's no access controls implemented; use it on a public network only at your own risk!
Instructions are simple: sideload the XAP, connect to WiFi (required), run the app (called "WebServer Native Access"), point a web browser (on a PC or phone that is also on that local network) to the URL that the app displays. You should get a basic index page. Click on a Filesystem or Registry link to begin browsing the phone. There's a textbox near the top of all filesystem pages, type in a path there (for example, "windows" with no quotes) and hit Enter or click Get Files. You'll see a list of the contents of that folder. Click on a file to download it or a directory to open it. Navigating the registry is similar, except you'll need to specify the registry hive and then the path from that hive (or no path, to access the root of the hive).
Modifications (uploading or editing files, creating, deleting, or changing registry keys or values) are currently not supported. They will be "soon" although my personal testing suggests that basically the whole registry, and most of the file system, is off-limits for writing unless you use restricted capabilities. Interestingly, I can *read* most of the registry, including stuff that I probably shouldn't be able to.
You might see an error code (error 5 is "ACCESS_DENIED", you'll see it a lot). Or you might see a status 500 message because of an exception in the server. Or the server may just crash (hopefully not so often anymore...). I'm making it more resilient, but there are still bugs. Please report any previously-unreported issues you find, including how to reproduce them, and I'll fix them if possible.
Also feel free to request features or changes; I'll implement them if reasonably possible. The app is a mixture of C++ and C# code; I could probably have done it all in one or the other but wanted to have a C++ component in case I ran into something that wasn't available in C#, and although it probably would have saved some time, I decided that hacking up a web server in C++ was maybe not the best idea.
The source code is on Codeplex, at the following projects: https://wp8webserver.codeplex.com/ for the server and the app (C#) and https://wp8nativeaccess.codeplex.com/ for the native access wrappers (C++). You may have to fix up the reference paths to get the C# component to see the C++ component correctly. The code is reasonably well documented, but let me know if you have any questions. Permission to re-use the code or components is granted under the MS-PL (Microsoft Permissive License) as posted on Codeplex.
Go forth and find cool stuff!
07 July 2013 - 0.2.0: Initial release, FS only, 920 downloads (source: 652 downloads)
14 July 2013 - 0.3.2: initial registry, HTTP server and web app encapsulation, source on Codeplex, 225 downloads
0.3.3: bugfixes, 454 downloads
0.4.2: basic registry values display, 86 downloads
0.4.3: bugfixes, 326 downloads
0.4.6: multistring registry values, bugfixes, updated libraries, first AllCapabilities version (950 downloads), 453 downloads
25 Oct 2013 - 0.4.8: binary and long registry values, formatting and bugfixes, 451 downloads AllCaps, 201 normal
22 Dec 2013 - 0.4.9: all registry value types, better threading, proper resume, remembers port, 97 downloads AllCaps, 53 normal
24 Dec 2013 - 0.5.0: background operation using Location APIs. Downloads: 1011 AllCaps, 963 Normal
20 Jul 2014 - 0.5.1: More capabilities, better navigation. Downloads: 108 AllCaps, 61 normal
07 Aug 2014 - 0.5.3: .REG export, better traversal, bugfixes. Downloads: 260 AllCaps, 164 normal
10 Oct 2014 - 0.5.5: Bugfixes and back-end work.
WebServer Native Access, ROM for the Windows Phone 8 General
Last Updated 2014-10-16