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

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 5 13:04:19 EST 2007


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





--- Comment #6 from Jerome Haltom <wasabi at larvalstage.net>  2007-11-05 11:04:19 MST ---
Sorry, host name adjusted:

using System;
using System.IO;
using System.Net;

class Test
{
  public static void Main(string[] args)
  {
    FtpWebRequest r =
(FtpWebRequest)FtpWebRequest.Create("ftp://65.99.218.194/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