Subject: Trouble uploading Long File name
Date: 2018-07-18 10:54:53
From: abhishekzararia
Source: trouble-uploading-long-file-name
----------------------------------------------------------------------

Hi,

I was trying to upload a file to FTP having 33 character length using ComponentPro.FTP uploadFile function.
I got "Error=Badly formed name "123456789012345678901234567890123.mov" (550)." .

I observed that the file having more than 32 characters is this error.
Is there any limitations in ComponentPro.FTP dll which restricts the FileName limit?

Is there any alternative to increase the file character limit? If yes, kindly share me the code sample.

Below is code sample

    private void uploadFiles()
        {
            try
            {
                Ftp client = new Ftp();
                client.Connect(serveraddress.Text);
                string auth = client.Authenticate(username.Text, password.Text);
                client.Passive = false;
                ComponentPro.IO.FileInfoCollection collection;//= client.ListDirectory();

                // Set the log level.
                ComponentPro.Diagnostics.XTrace.Level = ComponentPro.Diagnostics.TraceEventType.Verbose;
                // Add the UltimateTextWriterTraceListener listener to write to a file.
                ComponentPro.Diagnostics.XTrace.Listeners.Add(
                    new ComponentPro.Diagnostics.UltimateTextWriterTraceListener("c:\\temp\\log.log"));
                // You can also write log to a Console window with the following code:
                ComponentPro.Diagnostics.XTrace.Listeners.Add(new ComponentPro.Diagnostics.UltimateConsoleTraceListener());

                string dirname = @"GXF/default";

                string[] strsplit = dirname.Split('/');
                foreach (var diritem in strsplit)
                {
                    collection = client.ListDirectory();
                    bool bln = collection.Any(x => x.IsDirectory && x.Name == diritem);
                    if (bln == false)
                    {
                        client.CreateDirectory(diritem);
                    }                   
                    client.SetCurrentDirectory(diritem);
                }

                long _long = client.UploadFile("D:\\t2\\1234567890123456789012345678901234567890.gxf", "1234567890123456789012345678901234567890.gxf");
                client.Disconnect();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }          
        }


Below is the Log generated.

    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:04.42] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:04.73] Information - Response: 257 "V:/" is current directory.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:04.74] Information - Command: TYPE A
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.03] Information - Response: 200 TYPE command okay. Type is ASCII, Format is Non-print.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.04] Information - Command: PORT 10,20,89,243,42,113
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.33] Information - Response: 200 PORT command okay.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.33] Information - Command: LIST
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.63] Information - Response: 150 Opening data connection for LIST V:/.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.91] Verbose - Info: FTP data connection accepted from 10.21.74.50:20.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.92] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 GXF
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.94] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 MXF
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.94] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 MPG
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.94] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                  0 May 21 23:24:42 PIN
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.94] Verbose - Info: 268 bytes transferred.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.94] Verbose - Info: Closing downloading data connection.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.94] Verbose - Info: Waiting for data transfer ending message.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.95] Information - Response: 226 Transfer complete.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:05.95] Verbose - Info: Data transfer ended.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.12] Verbose - Info: Transfer ended successfully.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.12] Verbose - Info: FTP data connection closed.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.12] Information - Command: CWD GXF
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.44] Information - Response: 250 Change of directory to V:/GXF/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.46] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.74] Information - Response: 257 "V:/GXF/" is current directory.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:06.74] Information - Command: PORT 10,20,89,243,42,146
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.03] Information - Response: 200 PORT command okay.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.04] Information - Command: LIST
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.36] Information - Response: 150 Opening data connection for LIST V:/GXF/.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.79] Verbose - Info: FTP data connection accepted from 10.21.74.50:20.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.80] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Sep 18 2012 CT
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Mar 02 2006 default
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Feb 20 11:06:00 GXF
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Mar 05 13:49:00 MXF
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Jun 25 2012 Omneon
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Mar 02 2006 Recycle Bin
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Apr 27 2010 Space TEST
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:07.83] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Apr 27 2010 Space TESTING
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.00] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Jun 28 2012 Ver_6_27
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.00] Verbose - Info: Found FTP Item: drwxr-xr-x   1 user  group                    Nov 19 2007 watchtest
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.00] Verbose - Info: 680 bytes transferred.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.00] Verbose - Info: Closing downloading data connection.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.01] Verbose - Info: Waiting for data transfer ending message.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.01] Information - Response: 226 Transfer complete.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.01] Verbose - Info: Data transfer ended.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.01] Verbose - Info: Transfer ended successfully.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.01] Verbose - Info: FTP data connection closed.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.21] Information - Command: CWD default
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:08.54] Information - Response: 250 Change of directory to V:/GXF/default/ successful, xfer mode GXF.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:11.07] Information - Command: PWD
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:11.39] Information - Response: 257 "V:/GXF/default/" is current directory.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:11.40] Information - Command: TYPE I
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:11.75] Information - Response: 200 Type set to IMAGE.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:11.77] Information - Command: PORT 10,20,89,243,42,226
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:12.07] Information - Response: 200 PORT command okay.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:12.08] Information - Command: STOR V:/GXF/default/1234567890123456789012345678901234567890.gxf
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:12.37] Information - Response: 150 Opening MOVIE mode data connection for /explodedFile/V:/default/1234567890123456789012345678901234567890.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:12.66] Verbose - Info: FTP data connection accepted from 10.21.74.50:20.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.58] Verbose - Info: FTP data connection closed: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
       at c_DAA.c_L1(Byte[] c_WE, Int32 c_JL, Int32 c_P7, SocketFlags c_N1)
       at c_NLL.c_L1(Byte[] c_WE, Int32 c_JL, Int32 c_NT)
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.58] Verbose - Info: Waiting for data transfer ending message.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.58] Information - Response: 426 Error in transfer, 0x80044e06: Internal movie subsystem error.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.58] Verbose - Info: Data transfer ended.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.58] Verbose - Info: Transfer ended with error code 426.
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.62] Error - Info: Encounter an error while writing data: ComponentPro.Net.FtpException: Error in transfer, 0x80044e06: Internal movie subsystem error (426).
       at ComponentPro.Net.Ftp.c_Z8M(c_T7M c_QM, FtpResponse c_GW, String c_FW, Int64 c_QDL, String c_BKM, Boolean c_RDL, Boolean c_SDL, Boolean c_UCL, AsyncOperation c_Y)
       at c_NLL.c_L1(Byte[] c_WE, Int32 c_JL, Int32 c_NT)
       at c_NLL.Write(Byte[] buffer, Int32 offset, Int32 count)
    Ftp: 1, Thread Id: 0 [07-18-2018 16:16:16.67] Error - Info: ComponentPro.Net.FtpException: Error in transfer, 0x80044e06: Internal movie subsystem error (426).
       at ComponentPro.Net.Ftp.c_Z8M(c_T7M c_QM, FtpResponse c_GW, String c_FW, Int64 c_QDL, String c_BKM, Boolean c_RDL, Boolean c_SDL, Boolean c_UCL, AsyncOperation c_Y)
       at c_NLL.c_L1(Byte[] c_WE, Int32 c_JL, Int32 c_NT)
       at c_NLL.Write(Byte[] buffer, Int32 offset, Int32 count)
       at c_G6M.Write(Byte[] buffer, Int32 offset, Int32 count)
       at ComponentPro.Net.Ftp.c_J4M(ProgressFileItem c_YGM, Stream c_T7, AsyncOperation c_Y)

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index