Error in winscpnet.dll ,while transferring the file

Advertisement

bilumon
Joined:
Posts:
2
Location:
kerala

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.

Reply with quote

Advertisement

bilumon
Joined:
Posts:
2
Location:
kerala

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

Reply with quote

Advertisement

You can post new topics in this forum