1

I need to integrate with some older software that will transfer files to our server via FTP. There is no other way to receive these files other than FTP.

As files are uploaded I would like to perform some logic.

I have no way of knowing in advance when new files will be uploaded (they are not uploaded at regular intervals).

I've created a simple Windows Service that uses the FileSystemWatcher class to monitor the root directory of an FTP site and send me an email when new files are created (email is just for demo purposes, production version will probably POST the file to our web api or something). While this works, it has a lot of "moving parks" and requires that the service be installed and running, and it doesn't seem like FileSystemWatcher is all that reliable.

Is there a way to have an ASP.Net site accept FTP uploads?

Does anyone have a better idea for handing incoming files over FTP?

The software sending the files over FTP does not need to read anything on our server, it exclusively writes files.

Community
  • 1
  • 1
Greg
  • 8,574
  • 21
  • 67
  • 109
  • Why don't you just poll at regular intervals for files? – peter.petrov Dec 16 '13 at 22:55
  • I'd like to make this as "realtime" as I can, and even if I resort to polling I still need a separate timer service to keep track of when to poll. – Greg Dec 16 '13 at 22:57
  • Assuming you are in a position to keep your ASP.Net app alive (i.e. IIS settings changed to not kill it on idle), why not just spawn your logic in a thread in the background when your app starts? There's arguments for and against doing this vs a service so make sure doing this instead of a service is really what you want. – AndySavage Dec 16 '13 at 23:31

0 Answers0