Hi guys, I want to write a small C # ftp client class library that basically needs to transfer files to the ftp location
what I want is a 100% reliable code in which I can get confirmation that the ftp file transfer was either 100% successful or unsuccessful
no resume support required
useful to have (but secondary):
some kind of distributed transaction, where only if the file transfer is successful for the file, I update my db for that particular file with 1 (true) ... if it failed, and then db will be updated with 0 (false)
but suppose the ftp file transfer was successful, but for some reason the db cannot be updated, then the file on top of the ftp should be deleted - I can easily do this using dirty C # code (where I manually try to delete the file if db update failed)
but what I'm exactly looking for is a file system based transaction on top of ftp ... so file transfers as well as db updates are not performed until both are successful (hence there is no need for manual deletion)
any clues?
source
share