[XAP][Source] Webserver v0.6.0 (File uploads)

Search This thread

oryan_dunn

Senior Member
Dec 23, 2010
679
183
I've tried to install this on my WP8.1 device. Couple issues, when I download it, it is a zip file. I'm not sure if I should leave it a zip or rename it to xap, so I put a copies with both names on my SD card. The second issue, I've not found the secret menu in the Store app to install local files, and it seems WP8.1 is too new to have much of use via google.

Edit: as a test, I downloaded an xap file from the Windows Phone Store website and put that on my SD Card and the "Install Local Apps" menu appeared in my store app. The zip or the zip renamed to xap do not show up in that menu. Any other tips to get this installed? Any other way to browse/save files in C:\Windows directory?
 
Last edited:

Sunius1

Senior Member
Aug 9, 2013
71
36
I'm not sure where you got .zip file from. In the OP, there are links for XAP downloads.

And for deployment, use Application Deployment tool, which comes with Windows Phone SDK. Alternatively, use Windows Phone Power Tools, but that needs Windows Phone SDK installed as well.
 

oryan_dunn

Senior Member
Dec 23, 2010
679
183
I'm not sure where you got .zip file from. In the OP, there are links for XAP downloads.

And for deployment, use Application Deployment tool, which comes with Windows Phone SDK. Alternatively, use Windows Phone Power Tools, but that needs Windows Phone SDK installed as well.

Strange, when I click those links in IE11 on Win8 or Win7, they download as zip files. When I click those links in FF24ESR on RHEL 6.5, they download as XAP. I was under the impression to install an XAP, you copy it to the SD card and the WP Store app will add a new menu "Install Local Apps". With the xap downloaded from this thread, that option does not show up. However, if I download an XAP from the WP Store website, put it on my SD card, that menu option shows up.
 

Sunius1

Senior Member
Aug 9, 2013
71
36
You can only install XAPs from SD card if they are downloaded from the store - that is they have store encryption. The XAPs that are given here are homebrew - you need developer SDK to install them.
 
  • Like
Reactions: oryan_dunn

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
New version, 0.5.1. Changes aren't very big (certainly not commensurate with the amount of time between versions; I just was busy with other stuff). Notable changes are an increased number of capabilities in the AllCaps version (caution: Some of them give access to pretty sensitive data) and improvements in the page templates and client-side scripts for navigation.
 

ngame

Senior Member
Mar 13, 2012
1,126
554
Mashad
New version, 0.5.1. Changes aren't very big (certainly not commensurate with the amount of time between versions; I just was busy with other stuff). Notable changes are an increased number of capabilities in the AllCaps version (caution: Some of them give access to pretty sensitive data) and improvements in the page templates and client-side scripts for navigation.

I think it's time to port your project to 8.1 and make your app able to navigate Root of c partition . isn't it ? :D ;)
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Sure, just as soon as you tell me why my phone gets error 0x80070003 (ERROR_PATH_NOT_FOUND) whenever it tries to install the 8.1 update. I'm spending a fair bit of effort fighting that one, right now. I really don't much want to hard-reset, and I'm not even *sure* that would fix things (goodness knows I've made some changes to the system partition, though I've tried to revert most of them). None of the update logs that I've found have been helpful - they only seem to record successful updates, not failed ones - and there's nothing obvious I can think of.

Context: http://xdaforums.com/windows-phone-8/help/trouble-updating-to-8-1-error-80070003-t2818389

I really wish I could make that mechanism work on 8.0 too, though. I'm currently more focused on trying to give the app itself enough privileges to just *read* the root (and ideally, write to it too) but that's been a long string of failed attempts. Most of them have involved the darn code signing restrictions, but if somebody wants to help me figure out how to add ID_CAP_DEVELOPERUNLOCK (which disables the code signature enforcement for a process) to a service chamber (rather than an app chamber), we'll have this whipped. I'm pretty sure I can make the required registry edits; I just need to know what they are!
 

ngame

Senior Member
Mar 13, 2012
1,126
554
Mashad
Sure, just as soon as you tell me why my phone gets error 0x80070003 (ERROR_PATH_NOT_FOUND) whenever it tries to install the 8.1 update. I'm spending a fair bit of effort fighting that one, right now. I really don't much want to hard-reset, and I'm not even *sure* that would fix things (goodness knows I've made some changes to the system partition, though I've tried to revert most of them). None of the update logs that I've found have been helpful - they only seem to record successful updates, not failed ones - and there's nothing obvious I can think of.

Context: http://xdaforums.com/windows-phone-8/help/trouble-updating-to-8-1-error-80070003-t2818389

I really wish I could make that mechanism work on 8.0 too, though. I'm currently more focused on trying to give the app itself enough privileges to just *read* the root (and ideally, write to it too) but that's been a long string of failed attempts. Most of them have involved the darn code signing restrictions, but if somebody wants to help me figure out how to add ID_CAP_DEVELOPERUNLOCK (which disables the code signature enforcement for a process) to a service chamber (rather than an app chamber), we'll have this whipped. I'm pretty sure I can make the required registry edits; I just need to know what they are!

I saw your topic before you send this post .
I saw many people with the same problem in 8.1 update .
did you tried a Hard reset ?
I checked MS answer web page . it seems this problem didn't solved but one of them said he went to the cellular warranty center and they solved the problem for him , but how ? Don't know .
--------------------------------------------------------------
Edit :
It seems there's no way to interop unlock damn Nokia Phones :(
I told to one of my friends who know how to work with box as well .
he tried to Interop unlock Nokia phones but some of them Hard broken and some of them get some issues like calibration problems and etc.
 
Last edited:

spavlin

Senior Member
Dec 26, 2006
321
643
GoodDayToDie
Have on Ativ 8.1. Could you put on the full list ID_CAP necessary for WebAccess_0_5_1_AllCapabilities.(ID_CAP_CA_..., ID_CAP_CELL_..., ID_CAP_PRIV_..., ...)
WMAppManifest.xml insufficiently.
 
Last edited:

tdecision10

Member
May 6, 2009
35
7
Sideload Webserver

Greetings:

When I go to sideload with Application Deployment I get the following:

Error - Installation of application failed. Runtime error has occurred. Fix the Capabilities in WMAppManifest.xml file.

Am I missing a step?

-Tdecision10
 
  • Like
Reactions: ngame

djamol

Senior Member
Jun 3, 2014
444
409
Pune
www.twitter.com
Greetings:





When I go to sideload with Application Deployment I get the following:





Error - Installation of application failed. Runtime error has occurred. Fix the Capabilities in WMAppManifest.xml file.





Am I missing a step?





-Tdecision10




Yes, i think you are trying to install xap heaving all capabilities but your phone is not Interop Unlock or high privilege caps unlocked. So ddon't install it.

DDownload different xap. As same version or delete Interop (Unlocked) Capabilities in WMAppManifest.xml file to be work.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Yeah, you either never capability-unlocked your phone after interop-unlock, or your phone isn't interop-unlocked to begin with. If it's the former, (re-)run the EnableAllSideloading tool. If it's the latter, you need to use the standard (not AllCapabilities) version of the app.
 

tdecision10

Member
May 6, 2009
35
7
Yeah, you either never capability-unlocked your phone after interop-unlock, or your phone isn't interop-unlocked to begin with. If it's the former, (re-)run the EnableAllSideloading tool. If it's the latter, you need to use the standard (not AllCapabilities) version of the app.

It is interop-unlocked:

WPH Tweaks, SAMWP8, Bootstrap, InteropHelper, EnableAllSideloading, etc, etc....are all installed.

I just ran EnableAllSideloading again.

Still the same error.

Thoughts?

-Tdecision10
 
  • Like
Reactions: Mattemoller90

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Well, that's weird. Previous versions work fine, I assume? I was able to install but 0.5.1 and my current in-development build (which has the same caps) on my phone just fine.

What phone version are you on? I'm on 8.0 GDR3 + the pre-8.1 update (8.1 itself refuses to install for me; I'm working on it). I have another device I can use to test for 8.1 compatibility, though it's not guaranteed to be a perfect match for yours either as it's pretty modified.
 

tdecision10

Member
May 6, 2009
35
7
Well, that's weird. Previous versions work fine, I assume? I was able to install but 0.5.1 and my current in-development build (which has the same caps) on my phone just fine.

What phone version are you on? I'm on 8.0 GDR3 + the pre-8.1 update (8.1 itself refuses to install for me; I'm working on it). I have another device I can use to test for 8.1 compatibility, though it's not guaranteed to be a perfect match for yours either as it's pretty modified.

I actually don't know what version I am on. I have attached a picture.

EDIT: I just updated with the 3 xml files method. I got it installed. Now I am at the point of 8.1 Developer Preview. Since I already have WebServer installed will it work with 8.1 DP?

EDIT2: The 8.1 Developer Preview update wouldn't install so the last question is irrelevant.

-tdecision10
 

Attachments

  • wp_ss_20140731_0001.jpg
    wp_ss_20140731_0001.jpg
    122.1 KB · Views: 98
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
New version 0.5.3 posted! This one introduces a pretty neat feature: you can now export and download .REG files from the registry! They are generated on-demand, so really huge ones (like all of HKLM) will take a while, but it's a good way to do things like share the configuration of a particular service on your phone, or compare a registry key before and after installing an update.

I don't promise that the .REG files are importable into regedit; they should be but it wasn't a critical priority. They are not (currently) importable into the webserver; the registry remains read-only through this app. They are liberally commented, to point out things like when a particular key couldn't be traversed because of an error (usually #5, ACCESS_DENIED) and to provide human-readable versions of some types (like multi-string) that are usually not readable in .REG format.

There are also some other bugfixes and small improvements. See the first post for more information and the download links!
 
im having the issue where the app will not run in the background and while screen is off. and when browsing the registry on my pc the download as reg button is not working. the dl reg button does seem to be working with android internet browser. 3rd issue is firefox for android forces redirects to google. still a great app overall. i have to upload more crashdumps for you to debug. i have several for .5.1 and .5.3 crashes that i invoked.

also i downloaded every capibility from my htc 8x. which includes extra caps for windows embedded handheld. any way to implement into a release?

Sent from my Galaxy Nexus using XDA Free mobile app
 
Last edited:
  • Like
Reactions: GoodDayToDie

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Thanks, I'll check the background code to make sure it works even with the screen off and fix it if needed. I mostly on use it while running other stuff on my phone, so that's not been an issue. I also usually have the phone plugged in most of the time I'm using the app; when it stops working, is it plugged in?

I'd appreciate any info you can give me on the .REG download not working. What browser are you using? In what way does in not work (i.e. what happens when you click the button)? I'll do some more testing on that. I'm also working on a smarter version of that feature that automatically names the files a bit better and improves the comments a bit; I may eventually remove a redirect that takes place there and make it require one less round trip.

I didn't test in Firefox for Android. Odd that it wouldn't work, though. Other Android browsers work for you? Are you typing the full address (including the "http://" part)? It's possible Firefox4Android doesn't like IP address URLs, or doesn't like non-standard port numbers (you can switch to using port 80; the phone permits it and then you don't need to specify the port portion). It's also possible it doesn't like the server for some reason, probably involving the server being only partially standards-compliant and ignoring pretty much all non-essential stuff the browser requests. I'll test that out and see what I can do.

Feel free to post that list of capabilities. The app doesn't use the full capability list simply because many of them aren't usable by third-party apps and stuff breaks if you try to include them, so I only add capabilities as I need them. However, I would be happy to look at the list, and if they're useful, add them.
 

ngame

Senior Member
Mar 13, 2012
1,126
554
Mashad
GDTD is it possible to add this ability to your app ?
save full list of files and file sizes of System files .
after each update run app and let app check for files and let us know witch files are edited or witch files are new !
I think it can be helpful if it is possible
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    Version Alpha 0.6.0 is now available
    I'm back! Not dead yet, I promise. This is actually a relatively small update in terms of user-facing features, with only one really big new thing - support for file uploading - but that's a lot bigger than it might sound. It's the first write support I've implemented in the server, and it also required some fairly massive updates to the HttpServer component (support for binary requests, for POST parameters, for MIME multipart parsing). These will be built upon in forthcoming versions to add support for things like registry editing, in-browser file viewing (possibly editing), and so on. There are also a large number of small fixes and improvements that I've made over the last two-weeks-shy-of-a-year, which should make the server faster, more robust, better able to support concurrent connections, and lighter on device resources. Finally, while the app still targets WP8.0 and should run on 8.0, it now is designed for 8.1 compatibility (especially the AllCapabilities version).

    Previous update (0.5.6): This version is mostly bug fixes and UI changes. The biggest changes are: clearer display of weird registry data types, the server now consumes fewer threads (it used to spawn them with wild abandon) and does faster string compares, the app version is now shown on the phone, error pages are now better, if you launch the app without a WiFi IP address it'll offer to take you to the WiFi settings page, connections are no longer closed as soon as the app starts sending a response, and the server now defaults to using the Connection: keep-alive header, with a two-minute timeout. The last change, combined with the second-to-last, should hopefully both do away with the tendency to have the app fail to display a page. However, I shouldn't have *needed* to switch it to "keep-alive" - using "close" should have worked - but it still veeeery occasionally would kill the connection early. Agh. Anyhow, this is better in the meantime.

    DevDB offers me a support / Q&A thread. Please use that thread to ask questions; don't PM me unless it needs to be kept private for some reason!


    ISSUES ON WP8.1:
    • It *should* work to deploy the app with "Application Deployment", but if you have a problem try deploying with "Windows Phone Application Deployment 8.1" instead.
    • 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.
    • RESOLVED The AllCapabilities version included a few capabilities that were present in 8.0 but removed in 8.1. Those capabilities have been removed; the AllCapabilities version now deploys and runs on capability-unlocked WP8.1 phones.

    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! There's a DevDB section for posting bug reports, and you can also use CodePlex if you want.

    I finally implemented file upload! I'll work on getting more stuff like that (file delete, possibly file rename/move/copy, various registry edits), hopefully soon! I also hope to add support for different areas, like an "Applications" path, a "Processes" path, a "Services" path... eventually. Many of those are really hard without good privileges. 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 caching, and much more. I did finally implement Connection header support.

    Once again, the XAP is published twice. One is a fairly standard XAP that any phone can sideload, and the second has many exotic capabilities to enable viewing of (and writing to) slightly more of the file system and registry. 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. The AllCapabilities version now works with WP8.1; sorry for the long delay on that!

    An item of note: the AllCapabilities version (or either version, on WP8.1) 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!

    DESCRIPTION: This is a simple webserver app which can enumerate those files that are in folders readable from the sandbox, can download and upload (access permitting) files, can browse the registry, and can display the contents of registry values of any type. It runs on WP8.x (not yet tested on W10M). 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, "C: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. There's also a box for uploading files, one at a time, to the current directory. 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).

    As of v0.6.0, uploading files is finally supported! Other modifications (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.

    You might see an error code (error 5 is "ACCESS_DENIED", you'll see it a lot; I should replace it with an appropriate 403 or whatever). 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!

    Version history (see the git commit logs for more detail:
    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: 358 AllCaps, 352 normal
    07 Aug 2014 - 0.5.3: .REG export, better traversal, bugfixes. Downloads as of 0.5.5 release: 260 AllCaps, 164 normal
    10 Oct 2014 - 0.5.5: Bugfixes and back-end work. Downloads as of 0.6.0 release: 140 AllCaps, 113 normal
    25 Oct 2014 - 0.5.6: Bugfixes and UI tweaks. Downloads as of 0.6.0 release: 1720 AllCaps, 1334 normal
    12 Oct 2015 - 0.6.0: Binary requests, file uploads, bugfixes.

    XDA:DevDB Information
    WebServer Native Access, Tool/Utility for the Windows Phone 8 General

    Contributors
    GoodDayToDie
    Source Code: https://wp8webserver.codeplex.com/


    Version Information
    Status: Alpha

    Created 2014-10-17
    Last Updated 2015-10-12
    6
    Not actually part of the webserver yet, but...

    Just added the skeleton of a Process library to the NativeAccess project. It gives the ability to create and delete processes (assuming that you have the permissions to the executable / process in question) and also to get the current process's ID and command line, plus get or set environment variables. It hasn't really been tested yet, but it's there...
    4
    I'm going to use this space to mention something that's pretty cool:
    J. Arturo of http://www.komodosoft.net is using a modified version of the HTTP server that powers this app in the ShareFolder app (http://www.windowsphone.com/s?appid=e2b9c82e-eaa1-4a3b-9d4a-8a2933a8bdb4) to support opening video files directly from Windows network shares! This was done to work around a limitation of the WP8 media control: it can only source from an isolated storage file or a HTTP URL. By running a server in the background and streaming the video file through it, and pointing the video player control at the localhost URL, it becomes possible to play the file on the phone without first copying it to the app's isolated storage. A very cool way to solve the problem! Also, reviewing the changes that were made to the network code of the server pointed me toward those threading fixes I made that have hopefully much improved version 0.4.9.
    Please note that the updated version of ShareFolder with this feature may not yet be available, although it should be soon. It is a commercial (paid) app, but the author sought and received permission to use my code (although the license does not require such permission be received).
    4
    New version, 0.4.9 posted. Should have fixed or at least greatly improved the performance and stability issues that were plaguing the app. Additionally, resume and port-changing now work as they should, and all registry types (including unknown/illegal ones) are now supported.
    3
    Meh, that's because I forgot to attach the XAP. You could have grabbed it from Codeplex, but... yeah. Fixed.
    EDIT: To be more clear, you could have grabbed the updated NativeAccess Registry class from CodePlex and recompiled the server against it... jeez, I was bad with this release. ALL FIXED NOW (I hope...)