Welcome to the Xceed Community | Help
Community Search  
More Search Options

FtpClient.Connect on Windows Vista

Sort Posts: Previous Next
  •  09-03-2009, 3:45 AM Post no. 23696

    FtpClient.Connect on Windows Vista

    Hello Xceed

    I am using the Ftp library version 4.0 (Demo) and get this error when trying to connect to ftp server.

    "An invalid AsyncResult was received while executing a command."

    My code is:

    ftp.Connect(strHost, 21) - where the strHost is ftp://www.xxxxxx.xx

    The same code works fine on a Windows XP machine.

     Kind regards

    Johnny E. Jensen

     

  •  09-04-2009, 11:38 AM Post no. 23763 in reply to 23696

    Re: FtpClient.Connect on Windows Vista

    Hi Johnny,

    Can you set the TraceWriter property so we can get a log of the communication with the server?

    FtpClient.TraceWriter = new StreamWriter( @"D:\ftp.log", true );

    Can you also provide the relevant and complete code snippet that your are using to do the transfer?


    Xceed - Software Developer and Technical Support
  •  10-30-2009, 11:34 AM Post no. 24715 in reply to 23763

    Re: FtpClient.Connect on Windows Vista

    Hi Mohamed

    Sorry for taking so long a time. The trace log i empty so the error occourres under establishing the connection. My code is:

    ftp = new FtpClient();

    ftp.TraceWriter = new System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)+ \\Winner CRM\\FtpClient.log);

    ftp.Connect(strHost, 21); The strHost is "ftp://www.mysite.dk" ('mysite' is an alias for not making the real site public)

    if (ftp.Connected)

    {

    ftp.Login(strAccount, strPassword)

    ftp.ChangeCurrentFolder("\\..");

    }

    This is the errorexception i get:

    Xceed.Ftp.FtpInternalException: An invalid AsyncResult was received while executing a command.
       ved Xceed.Ftp.Engine.ConnectFtpCommand.EndExecute(IAsyncResult asyncResult)
       ved Xceed.Ftp.FtpClient.DoExecuteCommand(FtpCommandChannel commandChannel, BaseFtpCommand command)
       ved Xceed.Ftp.FtpClient.DoConnect(FtpCommandChannel commandChannel, ConnectFtpCommand command)
       ved Xceed.Ftp.FtpClient.Connect(String hostName, Int32 port)
       ved Aware.Winner.CRM.Desktop.Forms.formDesktop.CheckForUpdates()
       ved Aware.Winner.CRM.Desktop.Forms.formDesktop.mnuHelpUpdates_Click(Object sender, SmartItemClickEventArgs e)
       ved Xceed.SmartUI.SmartItem.OnClick(SmartItemClickEventArgs e)
       ved Xceed.SmartUI.Controls.MenuBar.MenuItem.OnClick(SmartItemClickEventArgs e)
       ved Xceed.SmartUI.SmartItem.InvokeOnClick(SmartItemClickEventArgs e)
       ved Xceed.SmartUI.SmartControl.InvokeItemClick(SmartItem item, ClickSource clickSource)
       ved Xceed.SmartUI.SmartControl.InvokeItemClick(SmartItem item, ClickSource clickSource)
       ved Xceed.SmartUI.SmartControl.OnMouseUp(MouseEventArgs e)
       ved System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       ved System.Windows.Forms.Control.WndProc(Message& m)
       ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
     

    Kind regards

    Johnny E. Jensen

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.