10

I am not yet familiar with Visual Studio SP development as I have just started developing on SP sites less than 2 months.

I would like to use a SP list to initiate a transfer of HUGE files which can be larger than 100GB (yes, that is correct one-hundred GB) from a local PC to a dedicated storage location on a remote server.

I do not want to upload the file to the content database nor do I want to use a BLOB. The life cycle of the file on the server is short lived (max 2 weeks.)

This is what I am thinking of doing:

  1. User fills out a form using NewForm.aspx.
  2. Data gets posted to a SP list.
  3. Asks location and filename of file to "upload."
  4. Workflow starts
    4.a. File gets uploaded. (This is where the FTP comes in.)
    4.b. Email gets sent to designated users when upload completes.

I know how to do everything except the actual FTP transfer.

How can I initiate the actual FTP transfer? Has anyone done this before?

P.S: For those who want to know, the files are .STL for Rapid Prototyping and 3D printing.

Thanks in advance.

(2011/06/21) Edit: Thanks everyone for your suggestions. They are ALL good. I will take a look at each one and see which answer is best in my situation.

3 Answers 3

3

.NET supports the use of FTP through the FtpWebRequest class. You can simply use this from inside your workflow. http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx A note of concern is that you must ensure that the workflow runs in the background on the timer service otherwise you'll be bodging up threads that are serving users.

2
  • 1
    I'd also ensure the workflow has plenty of fault handlers for the various error messages that the FTP class may throw back. Also, I think (but not certain) that you might have to write an activity for when the FTP transfer completes, so you can send an email when that happens.
    – James Love
    May 24, 2011 at 7:19
  • It seems that we were using something like this on a different but similar project. Jun 21, 2011 at 18:12
3

Consider using BITS (Background Intelligent Transfer Service) that Microsoft also uses to transfer update files to local PC's.

This service is resumable, so you wont have to worry about the stability of the line, if a download "dies" 10KB before the 100 GB has been uploaded. You can also prioritize uploads.

Some links if you are interested:

http://msdn.microsoft.com/en-us/library/bb968799.aspx
http://msdn.microsoft.com/en-us/magazine/cc188766.aspx
http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service
http://msdn.microsoft.com/en-us/library/bb401556.aspx
http://msdn.microsoft.com/en-us/library/aa362828.aspx

0

I'm with Wouter on this one. To avoid your FTP hogging down the w3wp.exe processes you can add a workflow that starts, but the workflow does not do the FTPing, instead you add a timer job that do the heavy lifting. Then you let the timer job update the WF which finishes and notifies the user that everything is ok (or not).

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.