Transfer files between users of the same app with "cloud" storage - hosting

I am building an WPF app that need to exchange some very small xml files with other users. I'm currently looking into peer2peer networking, but I need the sender of the files to be able to send without the receiver being online also. I do not want to host a service myself, and I want the users to store the other users they interact with locally on their machine, for example just a name together with a GUID or email adress to identify them.
Do you guys have any suggestions on how to solve this? My wishful thinking would be if there was a free or cheap service where users could connect via my program to a public API and upload their files. And when the receiver user logs on, it would check the service and authenticate somehow, and download the XML files so it could be imported by the program.
I have made a solution with a IMAP library where the XML files are attached in the email and sent to the receivers email account. The program on the receiver checks the email and read the attachment. This works ok, but is not very slick and also filling up the users inbox and sent items with garbage..
Any suggestions is greatly appreciated.
Best regards
Ola

This is one idea:
Normally, Block Storage volumes are seen as extra 'Drives' that you attach to a Virtual Machine. You could then use this but as if it was a metaphorical 'USB flashkey' that you would share with the other person.
Create the storage volume
Attach it to your VM and copy your
data-to-be-shared on it
Detach the volume from your VM
Your Buddy, attaches it to his VM
He then copies the files and voila!
All this could be done through a web interface and you wouldn't have to do any networking steps.
All you need now is a capable Cloud Geek, a pot of coffee and some convincing.

Related

Ways to associate an App Store App and a Desktop App

I am working on a product for Windows 8 that needs to perform some low-level tasks, display some UI, and communicate with an external server. I definitely need a Windows service to accomplish the low-level tasks. At the same time, I would like to use the cool features of Windows App Store apps, like push notifications, live tiles etc... for the UI. In this design, both my service and my app would communicate with my external server.
The flow would be something like: my Windows service sends some information to my server, which then sends a push notification to my App Store app.
I understand that deployment is not pretty in this scenario, but let's put that aside for now. My problem: How does the server know that the service and the app are on the same machine, and consequently linked together? i.e. When my Windows service sends information to the server, how does the server know where to send the push notification? I need is some sort of shared, unique, identifying information.
I have seen lots of discussion (usually frustrated in nature) about the lack of inter-process communication between App Store apps and desktop apps. In my case, I have two options:
Generate the exact same unique identifier in the service and in the app. This seems unlikely because apps don't seem to be able to access very much system-specific information. I'd love to be shown that I am wrong about this.
Generate a unique identifier in the server OR in the app and communicate it to the other component. Potential ways to do this:
Create the identifier in the app, save it to a file, and then access the file from the service.
Some sort of local socket solution (I've read this doesn't work, but have not tried)
Of course, option 2 seems likely to violate the Windows 8 app Certification Requirements, notably:
Windows Store apps must not communicate with local desktop
applications or services via local mechanisms, including via files and
registry keys.
Any advice would be most appreciated.
I'm not a lawyer, but if it says "via local mechanisms" then you could still possibly communicate via a cloud service as long as having both apps installed isn't necessary to have some features in the app or if you don't mean to publish the app in the store.
You could save some sort of a token in the documents folder or if your desktop app can run with appropriate permissions - it could access the local data folder of the Windows Store app to synchronize the token for use in communication with the web service.
Perhaps the user could just be asked to copy and paste a token between the two apps?

Can Skydrive credentials be shared?

I want to send info between a desktop/laptop/tablet app and Windows Phone. One possibility is to send data to the SkyDrive account and have the other end pick it up from there. Is this feasible? What I have in mind is the "Windows 8" app running on the desktop, laptop, or tablet allowing the Windows Phone app[s] to send data to its account. Is this possible, such as by providing the Windows Phone app with the Skydrive login info, or...???
From all the other questions you've posted around this query, it sounds like you want to put a mechanism in place to communicate between a Windows 8 app and a windows phone app. I would recommend you look at building a service to handle the communication instead of trying to leverage mechanisms that weren't designed for what you want to achieve.
In direct answer to the this question, though, you can probably achieve it in this manner, but what happens if the user deletes the file you create?
So, SkyDrive is unique to a user, not a device. This means if your application is running on more than one device you can use SkyDrive as a shared, unified storage option. Not just for files but also for application settings. There's an SDK for every platform, not just MS.
Here's what you need to consider.
The roaming API in Windows 8 puts information in a protected area of SkyDrive. As a result, the user cannot delete or screw up the files stored there. To that end, using SkyDrive as a shared location (like you are asking) doesn't have this benefit. The user can screw with your files or delete them - and wreck your app. There is no such thing as protecting your app files in SkyDrive (at this time).
Specifically, to your question:
The authorization model for SkyDrive requires a token that cannot be practically cached for any app. Also, you cannot cache credentials because you never get the credentials in the first place - you only get the resulting token. Listen, you would violate every possible best practice if you //asked// the user for their username and password and stored them. Please do not do this.
The final answer is this: an app on multiple devices can use SkyDrive as a shared storage solution for files and settings (like XML files) - but the developer needs to understand the risk and mitigate that (mitigation might be easy for your app). The user, on every device, would need to sign in and grant each application access to it folders. And, that's it.

Windows Phone7 Share data among applications

I searched everywhere and wondering whether any posible way available for share data among applications within the mobile phone itself. What I basically meant by that is, if there any way that can create a file from one application and allow other applications to access that file.
The problem is, If we save the file in application's isolated storage, then any other application won't be able to access it.
For example a scenario like this. One application produce a file and store it in a public location within the phone and later using the email client application need that file to be sent as an attachment.
Really appreciate any guidance/ help over this task. Thanks in Advance...!!!
Unfortunately, there's currently no way to share data between applications on Windows Phone. For this, you'll have to rely on an external server. Depending on what your apps are doing, you may want to consider using skydrive or dropbox integration to share the files.

FTP access on Windows Azure

Quick question. I'm currently moving a asp.net MVC web application to the Windows Azure platform. Everything is working out okay apart from one thing.
In the application at the moment, we make use of FTP accounts for each user to import large quantities of files to our database.
I understand FTP on Azure is not as straightforward.
I've googled and found this article: Ftp on Azure
This seems to be what I need except obviously we'll need to be able to add new users with their own separate FTP account. Does anyone know of an easy workaround for this?
Thanks in advance
Did you consider running a (FTP) service that's not IIS based, and you could add users programatically? Also, how are you going to solve data sync issues when the role recycles or when you upgrade it? Make sure to backup to blob on a somewhat regular basis!
Personally, I'd mount a VHD drive (Azure Drive) which is actually hosted on blob storage, and have my FTP server point to that drive. However, make sure you only have one instance of the server (problem #1) unless you don't need higher than 99,9% reliability you can solve this by running a single instance. Step 2 is I'd implement user management in relation to that program.
It's not straightforward, and I'd advise against it though. But I understand that sometimes you have to do this. I would solve it like I described above.

How to share files created by an app?

How do I share files (music, video, image) create by my app? I am interested in sharing audio file specifically.
Imagine I have a program that generates wav file.
How do I take it from isolated storage?
Is it possible to sent an attachment with e-mail?
Save it on SkyDrive?
Share on Facebook?
Put it to media library?
At least in some convenient for a user way to take it out from WP7 device?
Any help regarding this topic would be welcome
You cannot directly send it as an attachment through the EmailComposerTask, however you can use your own implementation of an email sending mechanism.
You can save it to SkyDrive, but then again you have to use a custom API layer (developed by you or by a third-party) to achieve this.
A better choice in my opinion would be having a WCF service that will transmit the byte array of the generated content to a specific location - this will ultimately give you more control over the transmission layer.
You can save images to the MediaLibrary - from where you can access it via the Zune Software and transfer to PC, etc.
This can be done with the MediaLibrary.SavePicture method. (Yes, this is an XNA method but it can be used from within a Silverlight application also.)
The other alternative is to upload it to a webserver and send it from there.
There is currently no way to save songs or movies.
How to upload a file to a webserver very much depends on: the server; the software it is running; and any security concerns realting to the content.
There is the start of a discussion on this at Uploading XML files from WP7, possible, how to etc?

Resources