You can use the Rebex SFTP in ASP.NET. However, it is not as easy as in ordinary applications.
There are several things to keep in mind:
- Using the stateful protocol such as FTP or SFTP through a stateless protocol such as HTTP can be quite complicated. In order to be able to devise the best approach to a particular scenario, a certain amount of familiarity with HTTP and FTP/SFTP is needed.
- ASP.NET environment is multithreaded - several instances of the same page can be processed at the same time.
- Lot of file transfer operations might take a long time to complete, especially file transfers.
- Even Connect and Login methods may take a long time to complete, so you probably wouldn't want to call this again and again - instances of the Ftp can be made persistent using an appropriate method.
- You have to make sure that SocketPermission is granted to your application. This may cause problems with some webhosters who runs client applications under unmodified MediumTrust security level.
Check out the Simple SFTP client ASP.NET sample application to get started.