Accessing application's documents from device through USB? - windows-phone

I'm working with a Windows Phone 8 application that writes logs to a file on the device. Is there a way to get access to that file? If not, what are my alternatives to seeing log information outside of using Visual Studio?

Yes you can read the file from isolated storage as long as it's a developer app installed on a developer unlocked phone. I use the Windows Phone Power Tools to do this, and there is a command line tool that comes with the SDK itself as well called IseTool.exe.

For your own access you can just use the advice in Paul's answer. If you want to get the files from other users you can use the Email Task and attach the log file to the email and have it sent to you or use some form of server logging.

Related

Access text file content from USB storage automatically from a server

I want to read the content of a text file (serves as a key) stored inside a USB mass storage automatically when the user is authenticated by his matching username and password for that website. It's like the textfile(key) is the extended authentication.
I think this needs to can be done by a (1) native program? or an (2) applet? What do i need to study? Can someone give me an overview for the process to make this possible?
Quite good in web tech but not with native app.
You cannot access USB mass storage devices through chrome.usb as they are claimed and handled by the host operating system.
Instead you could use the chrome.fileSystem API, but the user will need to select the file. Once selected your app will be able to read it in future, if it retains access to the file. See the API documentation for more details.
If you want this only for Internet Explorer, You can create an Active X. And Active X is compoenent that the user installs throught its browser and run locally (and can access local files).
Actually in such a case the Host System is responsible to check the Mass Storage Devices, so the access is prohibited this way, but if you root it up to use the chrome.fileSystem.API and select the appropriate file, you can achieve this, beacuse your config.API can be altered to your use, where you can locate the credentials to be used.(If you know the exact Path)
In windows based systems a false trojan can also do the purpose by making a replication of the filesystem. Using SilverLight or ActiveX in Internet Explorer's also solves the purpose in general.
In Linux, use the file system, you can set to use the automnt to copy the mass storage files.
Why not try building a .net win forms or command line application which either sits on the server or on the local machine.
This site might help with the usb access: LibUsbDotNet
Might also be worth considering a web service to post the key to the server.
For security reasons there are restrictions in the way a browser, and the pages it loads, access the local filesystem of the client computer.
Is it safe to assume you only require this to work on a specific browser? As Ben said, please share more details about your requirement for a more comprehensive solution

Monitor changes made by a desktop app to a file created by my Windows Store app

I'm making a Windows Store app that gets files from a server and store it locally for quick access. I also want to make it sync the file with Dropbox and push changes to Dropbox if the user make any. I looked into CachedFileUpdater and it seems to work if I use another Windows Store app to edit the file. However I ran into a great trouble trying to monitor changes made by a desktop app. This matters a lot because many files are office documents and Office 2013 is available to Windows RT and I would also like the app to be available to Windows 8.
First I tried to use CachedFileUpdater on all files but when I open the file using a desktop app, it will be opened in read-only mode and I can't save it in desktop mode. If I dont use it if the user chooses to open it with desktop app, the change will be saved but later my app won't be able to access that file somehow. I guess it is because the owner changes to the desktop app. Now not only I seem to have no way to monitor the file changes, but also can't I access those changes once it is modified by a desktop app.\
Is there some trick that may help? Thank you very much!

Is there any way to view the local storage of a Windows 8 Store application in debugger?

In my Windows 8 store application I keep all data in the local storage and I need to debug the data update. Is there any way to access the storage from Visual Studio 2012 debugger to see what data the application currently works with?
Why look in the debugger? You can get the location and then go look in the file using Windows Explorer. Use the debugger to get the location from
Windows.Storage.ApplicationData.Current.LocalFolder;
and then open that location in Windows Explorer.
Another way is tu run:
System.Diagnostics.Debug.WriteLine(Windows.Storage.ApplicationData.Current.LocalFolder.Path);
which shows exact path in Output window.
If you are looking for what an application that you didn't write installs you can look in C:\Users[user-name]\AppData\Local\Packages[app-guid].

Win8 Metro: Collect debug and diagnostics information

We are planning to develop a metro app and wanted to find out what kind of support/programming model is available in Windows8 RT to collect debug/diagnostic log data. This should quickly help/diagnose app errors in the field.
Can we log debug data as we do traditionally in Windows apps and ask user to send the log file when encountering an error ?
For Ex. If the app misbehaves when loaded on the QA/end user machines, we can request QA/end user to attach the log files with the issue.
You don't have to collect any data, windows store is doing that for you. In windows store app Dashboard, under quality you have reports about chrashes and app unresponsive states, these are *.cab files with debug informations.
You can open this file (*.dmp) with Visual Studio, here are the details :
http://msdn.microsoft.com/en-us/library/windows/apps/jj933262.aspx
Have you checked this MSDN sample : Logging Sample for Windows Store Apps (ETW Logging in WinRT) ?

ClickOnce Online-Only Application as a TS RemoteApp

I've attempted just about everything to get our ClickOnce VB.NET app to run under Terminal Services as a RemoteApp. I have a batch file that runs the .application file for the app.
This works fine via RDP desktop session on the terminal server. As a TS RemoteApp, however, well... not so much.
I get a quick flash of command prompt (the batch file) on the client system and then... nothing...
Same goes for having it point to the .application file directly (without using a batch file) or even copying the publication locally and having it point to that.
I found a technet.microsoft.com discussion about a similar issue, but there's no resolution to it listed.
For anyone who has run into this before and got it working, what did you have to do?
We currently use RemoteApp's for everything else on that server, so I'm hoping to stick with that if possible.
The current workaround is to build and run an MSI-based installer for the app on our terminal server whenever we publish via OneClick out to the network, but this can be quite a pain at times and is easy to forget to do.
Since the app works fine via Terminal Services when run in full desktop mode but not during RemoteApp, I don't think it's anything specific to Terminal Server permissions so much as ClickOnce requiring something that isn't available when running as a RemoteApp.
The Key to getting it to work is to use Windows Explorer "C:\windows\explorer.exe". This process is the base process when you login to a full session.
If you setup the RemoteApp to use Windows Explorer and the command line argument of the path to the .application file for the ClickOnce application then it will work when launched as a remote application. Windows Explorer will flash for a second when it starts, but it will disappear then the ClickOnce application will launch.
Why does it have to be a ClickOnce application? I would consider just deploying the exe file and assemblies.
I know it only half a solution, but if the application does not change much, it might be a good solution.
I believe your problem is related to the fact that ClickOnce needs to store it's data in a special user folder called the ClickOnce application cache. Apparently because of how Terminal Services sets up user folders ClickOnce can't access this in TerminalServices mode.
See this link for more information.
http://msdn.microsoft.com/en-us/library/267k390a(VS.80).aspx
There may not be a way to do it :(
Can you launch the .exe directly? It's buried under your profile in \AppData\Local\Apps\2.0[obfuscated folders], but you should be able to find it.
That will skip the built-in update process, but if it can be launched that way you could then write code to do a manual update after the application starts.
Faced the same problem this morning and got it resolved by copying the clickonce app's directory from the user settings folder to somewhere like c:\MyApp\ - I know its nasty and not very ideal.. but good enough for me!
We recently ran across this issue and decided to post a bug report on this issue to the Visual Studio development team. Feel free to comment on the bug report. It has to be a bug in ClickOnce caused by some changes in Server 2008.
https://connect.microsoft.com/VisualStudio/feedback/details/653362/net-clickonce-deployment-not-working-as-remoteapp-or-citrix-xenapp-on-server-2008-server-2008-r2
We also have a discussion on the MSDN forums covering this issue:
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/7f41667d-287a-4157-be71-d408751358d9/#92a7e5d9-22b6-44ba-9346-ef87a3b85edc
Try using RegMon and FileMon when starting the app - You may be able to track it down to a file and/or registry permission issue.
Also maybe check the event logs to see if anything's getting logged when the process fails.