Best way to write FTP upload poll in C #

I currently have a manual process where we upload a text file to a business partner, it has an automated process that reads in a file, processes it, and then generates a results log file anywhere between 3 to 10 minutes (usually) after bootstrap. I need to automate this process through a .NET application. I have already finished loading, I have no result loading. Since I don't know exactly when the file will be ready for download, I figure I need to poll the remote site frequently, get a list of the files in the results directory, and see if what I expect works for me. > I read some stuff and found some links to AsyncCallBack, but I'm not really sure how. the solution should be something I can get around without any third party libraries outside of .net,since I have a budget of 0 for this small project.

Any help would be greatly appreciated!

+1


source to share


1 answer


Just try the thread (or your main thread) for x milliseconds and try to load when it is awake. No need to buy third party FTP library, FTP is built in .NET (FtpWebRequest and FtpWebResponse). They're not very nice (very bare bones), but will probably do what you want.



0


source







All Articles