Home Forums .NET libraries Xceed SFTP/FTP for .NET Exception occured: An error occurred while creating a file

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

    Hello,

    Hoping someone can help shed some light on a nagging problem that I’m having. Based on the samples, I have put together some code that will synchronize a local folder to a folder on an FTP site.

    Here is a snapshot of my code:

    — CUT —

    Dim connection As FtpConnection = New FtpConnection(m_hostAddress, m_userName, m_password)

    connection.KeepAliveInterval = intFTPKeepAlive

    Dim masterItem As FileSystemItem = Nothing
    masterItem = New DiskFolder(strLocalImageFolder)

    Dim itemsList As List(Of FileSystemItem) = New List(Of FileSystemItem)()

    ‘ Add master item at index 0
    itemsList.Insert(0, masterItem)

    ‘ Fill the itemsList to pass to Synchronize
    itemsList.Add(New FtpFolder(connection, strRemoteImageFolder))

    ‘ Set synchronization options with parameters
    Me.m_synchronizationOptions.AutoConflictResolution = True
    Me.m_synchronizationOptions.AllowCreations = True
    Me.m_synchronizationOptions.AllowDeletions = True
    Me.m_synchronizationOptions.CompareFileData = True
    Me.m_synchronizationOptions.PreviewOnly = False

    Try
    ‘ Master item is at index 0 of itemsList
    Synchronizer.EasySynchronize(m_synchronizationEvents, m_synchronizationOptions, 0, itemsList.ToArray())
    Catch exception As Exception
    AddConnectionLogInformationLine(“Exception occured: ” & exception.Message)
    Finally
    Me.m_abort = False
    connection.CloseConnections()
    End Try

    — CUT —

    The above code runs fine for approx. 10 minutes, then I receive the following error:

    Exception occured: An error occurred while creating a file.
    Type: Xceed.Ftp.FtpFile

    Does anyone have any ideas why I am getting that, and what I could try to fix it? Or is there a better method out there for synchronizing a local folder to an FTP site?

    Any help would be greatly appreciated!

    Thanks so much,

    –Eric

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

    Xceed Support
    Member
    Post count: 5658

    This was a bug. It has been fixed and should be available in our next <a href=”http://xceed.com/pages/TopMenu/Downloads/Updates.aspx”>release</a&gt;. To know if the a fix is in a certain release, check the release notes on the right.

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

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