- martin
Post a reply
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
Topic review
- bilumon
Re: Error in winscpnet.dll ,while transferring the file with code
we are getting error on file transfer using winscpnet.dll in vb.net . Error shown was "unable to cast of type winscp.transfereventarg to type winscp.transfer.operationresult" .Used winscp version was 5.13.1 . Is there any solution to fix it.
code:
Imports WinSCP
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = ""
.UserName = ""
.Password = ""
.SshHostKeyFingerprint = ""
End With
Using session As New WinSCP.Session
session.Open(sessionOptions)
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary
Dim transferResult As TransferOperationResult
Dim ab As String = ws1.GetData1("Remote").Tables(0).Rows(0)(0)
'''Error happening in below code
transferResult = session.PutFiles("C:\DI\input\*", ab, False, transferOptions)
transferResult.Check()
Dim transfer As TransferOperationResult
For Each transfer In transferResult.Transfers
Next
End Using
code:
Imports WinSCP
Dim sessionOptions As New SessionOptions
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = ""
.UserName = ""
.Password = ""
.SshHostKeyFingerprint = ""
End With
Using session As New WinSCP.Session
session.Open(sessionOptions)
Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary
Dim transferResult As TransferOperationResult
Dim ab As String = ws1.GetData1("Remote").Tables(0).Rows(0)(0)
'''Error happening in below code
transferResult = session.PutFiles("C:\DI\input\*", ab, False, transferOptions)
transferResult.Check()
Dim transfer As TransferOperationResult
For Each transfer In transferResult.Transfers
Next
End Using
- martin
Re: Error in winscpnet.dll ,while transferring the file
Can you show us your code?
- bilumon
Error in winscpnet.dll ,while transferring the file
we are getting error on file transfer using winscpnet.dll in vb.net . Error shown was "unable to cast of type winscp.transfereventarg to type winscp.transfer.operationresult" .Used winscp version was 5.13.1 . Is there any solution to fix it.