It's under different conditions, but it might help to know I ran this test here 
with Mono 3.2.0 on Mountain Lion against a Mountain Lion Server and it worked.

On Aug 2, 2013, at 10:33 AM, Aaron Oneal <aaron.on...@spicypixel.com> wrote:

> When and in what way does it fail? Do you receive an exception?
> 
> On Jul 30, 2013, at 6:31 AM, MikeN <mniem...@oowidgets.com> wrote:
> 
>> I have a simple FTP binary file upload, the code works fine in VS and Xamarin
>> Studio if I target .net, but fails when I target mono 2.10.9 (or 2.6.7).
>> [note: I have obscured the user credentials and IP address]
>> 
>>      FtpWebRequest request =
>> (FtpWebRequest)WebRequest.Create(@"ftp://xx.xx.xx.xx/Public/test.zip";);
>>      //request.Proxy = null;
>>      request.Method = WebRequestMethods.Ftp.UploadFile;
>>      request.UseBinary = true;
>>      //request.UsePassive = true;
>>      //request.Timeout = -1;
>>      //request.KeepAlive = false;
>>      request.Credentials = new NetworkCredential("realuserid", 
>> "realpassword");
>>      // Copy the contents of the file to the request stream.
>>      byte[] fileContents = File.ReadAllBytes(@"c:\MikeN\test.zip");
>>      //sourceStream.Close();
>>      request.ContentLength = fileContents.Length;
>>      Stream requestStream = request.GetRequestStream();
>>      requestStream.Write(fileContents, 0, fileContents.Length);
>>      requestStream.Close();
>>      FtpWebResponse response = (FtpWebResponse)request.GetResponse();
>>      Console.WriteLine("Upload File Complete, status {0}",
>> response.StatusDescription);
>>      response.Close();
>> 
>> Any guidance would be appreciated greatly.
>> 
>> MikeN

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to