Hi
I don't see credentials... Are You sure?
request.Credentials = new NetworkCredential
("anonymous","[email protected]");
regards
mel
On 2012.02.23 14:23, Natanael wrote:
I am with the following error in the command
request.GetRequestStream Stream stream = () // ERROR: Not Connected
, the routine below, can someone help me.
Uri uri = new Uri(ftpHost + "/" + remoteFilePath);
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.CreateDefault( uri );
request.KeepAlive = false;
request.Method = WebRequestMethods.Ftp.UploadFile;
request.UsePassive = false;
request.UseBinary = true;
Stream stream = request.GetRequestStream(); // ERROR: Not Connected
FileStream fileStream = File.OpenRead(localFilePath);
int Length = 2048; byte[] buffer = new byte[Length];
int bytesToSend = fileStream.Read(buffer, 0, Length);
while (bytesToSend> 0)
{
stream.Write(buffer, 0, bytesToSend);
bytesToSend = fileStream.Read(buffer, 0, Length);
}
stream.Close();
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/FTP-Upload-tp5507988p5507988.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rješenja/Solution Architect
Razvojni programer/Senior developer
Voditelj projekta/Project Manager
IX južna obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: [email protected]
w: http://www.holisticware.net
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid