[Mono-bugs] [Bug 333985] FtpWebRequest cannot put file properly.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 5 13:03:28 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=333985#c5





--- Comment #5 from Jerome Haltom <wasabi at larvalstage.net>  2007-11-05 11:03:28 MST ---
using System;
using System.IO;
using System.Net;

class Test
{
  public static void Main(string[] args)
  {
    FtpWebRequest r =
(FtpWebRequest)FtpWebRequest.Create("ftp://pony.ad.isillc.com/foo.txt");
    r.Credentials = new NetworkCredential("ftptest", "testftp");
    r.Method = WebRequestMethods.Ftp.UploadFile;
    r.ContentLength = 1;
    r.UseBinary = true;
    Stream s = r.GetRequestStream();
    s.WriteByte(0x00);
    s.Close();
    FtpWebResponse p = (FtpWebResponse)r.GetResponse();
    Console.WriteLine(p.StatusCode);
  }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list