I've noticed that this issue reported back in January doesn't appear to have been fixed, or at least the current installation available from the downloads doesn't have a fixed version of the component. Do you know if this problem has been resolved within the component itself?
For those who have been having the same problem here is a solution in vb.net (note: I consider this a potentially risky solution as I have no idea if the component calls the stream Seek method while transferring files through a stream other than prior to the transfer)
Public Class XceedBugFixStream
Inherits IO.FileStream
Private m_SeekEnabled As Boolean = True
Public Sub New(ByVal path As String, ByVal mode As System.IO.FileMode, ByVal access As System.IO.FileAccess)
MyBase.New(path, mode, access)
End Sub
Public Overrides Function Seek(ByVal offset As Long, ByVal origin As System.IO.SeekOrigin) As Long
If SeekEnabled Then
Return MyBase.Seek(offset, origin)
Else
Return MyBase.Position
End If
End Function
Public Property SeekEnabled() As Boolean
Get
Return m_SeekEnabled
End Get
Set(ByVal Value As Boolean)
m_SeekEnabled = False
End Set
End Property
End Class
To go about resuming the transfer you transfer using the stream as described above but using the XceedBugFixStream instead of a FileStream:
dim bfs as XceedBugFixStream
..
..
offset = GetRemoteFileSize(fullRemotePath)
bfs = New XceedBugFixStream(fullLocalPath IO.FileMode.Open, IO.FileAccess.Read)
bfs.Seek(offset, IO.SeekOrigin.Begin)
bfs.SeekEnabled = False
ftp.SendFile(fbs, filename, True)
Regards,
Kris Sheglova