Streaming large ipa files to iOS devices - c#

Hey everyone I am working on a custom app store for iOS. However, I am having a problem when my system tries to stream large ipa files to the device. Sense there is no way to tell the device the total size of the file during the stream the status bar on the iOS device wont budge until the file is finished downloading then it almost completely fills the status bar in an instant and installs the file. This may leave users to think that the download isn't working at all. I am trying to find an alternative way to handle these large ipa files. I am currently thinking that I could allow the device to make a direct request to the file without hitting any .Net runtime code. I would probably be able to handle this through an ISAPI filter, but then I would need a way to authenticate that request to make sure the user has access to that download. Any advice or input would be appreciated.
Thanks.

You might consider pushing the apps into S3 and sending out signed CloudFront URLs to authenticated users:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls-overview.html
Alternatively, you could just give the .ipa files very obscure names that would be hard to guess.

Related

Need help from someone who understands servers, and downloading files in c#

Let me start by describing what I want to do:
I have a Unity app, and I code it in c#.
In the app I want to download a file from a server, so I am using HttpWebRequest.
I sent out a HEAD request first to see if the file on the device needs to be updated or not, and to see the file size on the server. If the file needs to be updated I download it.
The class that I use for the downloads is in this git.
Now my problem is I don't know how to host the files because of the following issues:
I tried hosting it on a site with direct download links like ge.tt, but it does not support the HEAD request.
I tried hosting it on a free web host (000webhost), but the download gets stuck most of the time (for large files).
I tried hosting it on Dropbox but the function webRequest.EndGetResponse never returns.
I think the best solution would be to host the files on my computer, but I dont know how to do that, or how to get a download link that will work outside of my lan.
I would greatly appreciate any ideas you have, and answer questions about the code.
Thank you!

service application that monitor files being downloaded

Need to create a service application that monitor all files being downloaded. I was thinking about using the file watcher class but some end users can change the download directory. Any idea would be great.
Monitoring file system is no indicative of download activity, as you already figured out. Browsers do not expose a cross-platform API to report download events. Browsers plugins do, but that requires the plugin to be loaded, enabled and you'll need separate plugins for each browser out there. So the only sensible approach is a filter driver. In fact the OS exposes a handy helper layer specifically designed for this, the Windows Filtering Platform. Of course, C++ and networking expertise is required. Detecting downloads from all traffic is left as an exercise to the reader.
If you want to monitor files downloaded on computers in an office environment, your best bet would be to install a proxy server.

Throttle or kill large file uploads in asp.net (httphandler, webapi, or mvc controller)

I need low level control over http file uploads so I can kill an upload early.
Background:
We have a application (an httphandler) that serves downloads of media. It is able to throttle the downloads and also it's able to embed some encrypted meta-data in the file as it is being served to the client.
Here's what I'm trying to do:
I'm trying to figure out how to do the reverse of what I wrote above. I want to give our users the ability to upload one of these files so that our app can extract the encrypted data, decrypt it, and present it to the user. The problem is that these files can be big (200+ MB). The metadata though, is at the beginning of the file and we're able to read it even if the file is just a fragment.
So, does anyone know how I can gain low level control over the file upload so I can get the first N bytes of the file and then kill the upload? I'm hoping this is similar to the code I wrote for throttling downloads. I'm open to doing this via an httphandler, the webapi, or any other way that would be easy.

File upload tool

I would like to create a image file upload tool. The tool when started up and would ask the user what directory they would like to monitor and upload files from. In the background the tool would then post securely to a web service of some sort.
Constraints solution should work on Mac and Windows computers. I would like to make the upload process pretty automatic with little user intervention.
Basically the question I have is what would you use to create application that either runs in the background or foreground to basically continuously uploads files to a web server?
I have a couple of thoughts:
HTML5 using web workers (concerns accessing local files not sure the best way to do that)
Silverlight (my guess is I would have to sign the application)
Java web start application (Signing application)
Flash (scared of this idea)
I can do the Java web start application easy enough. Both HTML5 and Silverlight are things that I would like to know. I really don't care about flash at this point.
In Java, you can use the JNotify library: http://jnotify.sf.net . It works on Windows, OS X, and Linux.
I don't know about C# or HTML5. HTML5 (last I checked circa July 2011) doesn't have a filesystem API. In reality you need an app that can be distributed so it can run in the background, so Silverlight is out of the question. If I am misinterpreting your problem, please tell me.
I would try to go with a signed Java applet if you can foresee the need for downloading as well. It is difficult to find a good download solution other then a signed Java applet. A signed Java applet let's you push things to the users filesystem allowing for upload as well as download.

.Net Cloud Based Storage solution

I am now at the point where i cant get any further with out some help.I am trying to host files on the cloud and then access those files via code (C#). So far i have tried Rapidshare and Skydrive and have been unable to get either working at all. Below is a few things that i am trying to do or rather must be able to do with the cloud storage.
What i need is a place to host files on the internet (obvious).
The files can range in size from 10 megs to 100megs.
I Must be able to download the files via code as well as upload via code.
I don't really mind having to pay as long as the price is not ridiculous.Any help at all will be much appreciated.
Thanks
Stalkerh
Why don't you look at Amazon S3 they do what you want, are cheap and have a C# API wrapping their web service (But ThreeSharp is better).

Categories

Resources