Home Forums .NET libraries Xceed SFTP/FTP for .NET Connect Problems with scheduled login ftp

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21008 |

    Hello,

    we use xceed ftp in our digital signage systems to sync media folders from ftp-server to the different clients (temporary soultion).

    For this purpose we schedule our .net program “mediaSync” to run after login, which is automaticly after hardware start.
    Also we schedule the program to run each 2 hrs to look for new media.

    The problem is, that on machines (1/3) the login run didn’t work. The scheduled ones run OK, same as when i start the program manually.

    The error message is as followed:

     Error get Folder ftp:Xceed.FileSystem.FileSystemIOException: An error occurred while getting the starting folder.
    Type: Xceed.Ftp.FtpFolder
    FullName:  —> Xceed.Ftp.FtpIOException: An error occurred while starting to receive replies from the command socket. —> System.Net.Sockets.SocketException: Der Host war bei einem Socketvorgang nicht erreichbar 213.239.211.204:21
       bei System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
       bei Xceed.Utils.Security.Ssl.SecureSocket.EndConnect(IAsyncResult asyncResult)
       bei Xceed.Ftp.Engine.FtpCommandChannel.ConnectCompleted(IAsyncResult asyncResult)
       — Ende der internen Ausnahmestapelüberwachung —
       bei Xceed.Ftp.Engine.ConnectFtpCommand.EndExecute(IAsyncResult asyncResult)
       bei Xceed.Ftp.AsyncFtpClient.EndConnect(IAsyncResult asyncResult)
       bei Xceed.Ftp.FtpConnection.CreateConnection()
       bei Xceed.Ftp.FtpFolder.GetStartingFolder()
       — Ende der internen Ausnahmestapelüberwachung —
       bei Xceed.Ftp.FtpFolder.GetStartingFolder()
       bei Xceed.Ftp.FtpFolder..ctor(FtpConnection connection)
       bei mediaSync.FileSyncSystem.syncData(BackgroundWorker bw)

    I am not a Network – specialist, but i guess there is a network layer not ready yet.

    Can anybody give me a hint how to solve that problem?

    Thank’s in advance

    Best regards

    Ralph

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Ralph (had 3398 views)

    User (Old forums)
    Member
    Post count: 23064

    Apart from delaying running the application at log on, we don’t see a solution.  It is certainly linked to the network not being totally ready.  You could use a try catch block, and on this exception, make x-number of retries with a time delay between each retry.  Or you could use the TestConnection() method on FtpConnection, within a try catch block again, and go on with your application only once the connection is valid.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 548 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks,

    i have expected that, so i will do what you and already saw as solution.

    Thanx for your reply

     

    Ralph

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Ralph (had 1323 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Andre, I have a similar issue with my program.  Here is the error message and stacktrace output:

    “An error occurred while starting to receive replies from the command socket”

    at Xceed.Ftp.Engine.ConnectFtpCommand.EndExecute(IAsyncResult asyncResult)

     Here is my code:

     [code]

    try

    {

    http://ftp.Connect(FTPLocationIP);

    http://ftp.Login(FTPUser, FTPPass);

    string logString = string.Format(“Connecting to: {0} as ‘{1}'”, FTPLocationIP, FTPUser);

    lbLog.Items.Add(logString);

    }

     

    [/code]

    I see your note about doing the test connection or waiting…would I put that after the .Connect() and before the .Login() ?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by ganders (had 547 views)

    User (Old forums)
    Member
    Post count: 23064

    woops, I obviously didn’t copy the code in correctly…here it is:

     

    try

    {

    http://ftp.Connect(FTPLocationIP);

    http://ftp.Login(FTPUser, FTPPass);

    string logString = string.Format(“Connecting to: {0} as ‘{1}'”, FTPLocationIP, FTPUser);

    lbLog.Items.Add(logString);

    }

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by ganders (had 386 views)

    User (Old forums)
    Member
    Post count: 23064

    To add to my own confusion, this works on my own PC, but when I push it out to someone else’s, that’s when I get the error.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by ganders (had 2096 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.