Rahul
Rahul

Reputation: 2234

How to transfer large files from desktop to server ( .NET)

I am writing a .NET 2.0 based desktop client that will send large files ( well largish under 2GB) to a server. Need to develop the server as well. Server can be on any technology It should be secure so an underlying SSL stream is needed What are my options. Any obvious caveats etc I should be aware of To my mind the simplest solution is to open a tcp\ip connection over SSL to the server and send n packets each of size M bytes and then have the server append the chunks to the file and finally send an EOF packet as well

IS this horrible. Will the perf suck on the server with all these disk writes What are any other clever options. I am limited to .NET 2.0 on the client if I did move to a WCF client will it buy be something magical and cool for this scenario Thanks

Upvotes: 2

Views: 823

Answers (2)

dthorpe
dthorpe

Reputation: 36082

Take a look at the BITS service (Background Intelligent Transfer Service) that's already on your Windows machines. It's used by a lot of OS subsystems such as Windows Update to transfer large amounts of data using idle network bandwidth.

The biggest advantage to using something like BITS is that the transfer is interruptible and restartable - partial uploads are retained and coalesced when the transfer resumes later.

You usually think of BITS as transferring files from a server down to the client machine, but apparently BITS can be used to upload from the client to the server - there are third party utilities that use BITS to upload - including the YouTube uploader.

More info on BITS on Wikipedia: http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service

Upvotes: 4

Austin Salonen
Austin Salonen

Reputation: 50225

You can use BITS (Background Intelligent Transfer Service).

Upvotes: 1

Related Questions