User (Old forums)MemberAugust 15, 2007 at 3:54 pmPost count: 23064
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
‘ 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
‘ 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)
Me.m_abort = False
— 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.
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,
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Eric (had 2669 views)Xceed SupportMemberAugust 23, 2007 at 3:31 pmPost 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>. 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)
- You must be logged in to reply to this topic.