Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

upload file with ftp?

How can I upload files to server with ftp though code? my web host apperently dont allow ous to use the "regular" fileupload with in MVC or Web forms anymore on IIS7

I rather not use a third part app I use asp.net mvc 2, c#

like image 454
Dejan.S Avatar asked Apr 30 '11 12:04

Dejan.S


1 Answers

There are various methods but the simplist in my opinion is to make use of the FtpWebRequest class. There is a nice example of a simple file upload, making use of it, here:

http://msdn.microsoft.com/en-us/library/ms229715.aspx

like image 58
Roja Buck Avatar answered Sep 23 '22 15:09

Roja Buck