I am using asp.net, c#, MVC and nHibernate and I am trying to upload a file from a local machine to the server and replicate the file to the different server. I was able to upload file to the server and copy the file from one folder to the other folder on the same server without any problem.But how can I copy the file from one server to another server.
Please follow the link to see how to copy a file from one folder to another folder on the same server.
Click to see my answer to the file upload question.[please look for answer by kalyan]
Please help. Thank you.
Finally I got it figured out.. here is the sweet code for my own problem.
Side Note:(part I was missing before..) Before you do any thing you should have a FTP site. So, from the IIS (on the server) create a FTP site and point the root directory to the folder that you want to upload or download and manually change the username and password (mine: username: administrator, password: sweet123) from the properties of the site if necessary. (steps are very simple u can easily understand once u start creating an FTP site). I assume that you have your FTP site ready. Now, let us say the url is ftp://10.2.1.111/Images/.
And dont forget to add System.Net and System.IO to your namespace.
now from your code.