Executing SITE command

Jan 11, 2013 at 6:29 PM

I am trying to upload a file to a server using the OpenWrite method.  Before the upload I call the Execute method to set LRECL=648 and RECFM=VB.  The file uploads, but record length is set to the default 256 bytes.  Any ideas?

if (!(reply = conn.Execute("SITE LRECL=648 RECFM=VB")).Success)
 {
     throw new FtpCommandException(reply);
 }
conn.DataConnectionType = FtpDataConnectionType.PASV;
                
using (Stream ostream = conn.OpenWrite("T130148", FtpDataType.ASCII))
{
    try
   {
        //blah
   }
}

Coordinator
Jan 11, 2013 at 6:48 PM

I've only worked with file structured stream transfers which is what I developed and tested this project around. I'm not saying record structures can't be made to work, it's just beyond the scope of my understanding in regards to rfc959 and the FTP protocol.