Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Trouble Uploading File

$
0
0
Hello everyone.

I am new to this library so I apologize if this is a really silly question, but I am running into a bit of trouble with uploading a file to a device. Does anyone see anything wrong with this?
Dim upConf As FileStream = New FileStream(fileLocation, FileMode.Open)
Dim radClt = New SftpClient(hostName, 22, userName, uPass)

radClt.Connect()

If (radClt.IsConnected = True) Then
     radClt.UploadFile(upConf, "/tmp/")
     lblEnableResults.Text = "Results: " & Server.MapPath("~/System.cfg")
Else
     lblEnableResults.Text = "ERROR DIDN't Connect to device via sftp"
End If
Thanks in advance!

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>