Questions tagged [winscp-net]

The WinSCP .NET assembly (winscpnet.dll) is a .NET wrapper around WinSCP's scripting interface that allows your code to connect to a remote machine and manipulate remote files over SFTP, FTP, WebDAV and SCP sessions from .NET languages, such as C#, VB.NET, and others, or from environments supporting .NET, such as PowerShell and SQL Server Integration Services (SSIS).

The WinSCP .NET assembly winscpnet.dll is a .NET wrapper around WinSCP's scripting interface that allows your code to connect to a remote machine and manipulate remote files over SFTP, FTP, WebDAV and SCP sessions from .NET languages, such as C#, VB.NET, and others, or from environments supporting .NET, such as PowerShell and SQL Server Integration Services (SSIS).

For details see:

The assembly is also exposed to COM, and as such it can be used from variety of other programming languages and development environments--e.g., WSH-hosted active scripting languages like JScript and VBScript, Visual Basic for Applications (VBA), Perl, and Python.

For details see:

The library is primarily intended for advanced automation tasks that require conditional processing, loops or other control structures for which the basic scripting interface is too limited. The library is not a general purpose file transfer library. It particularly lacks support for interactive processing and as such it is not well suited for use in GUI applications.

Use tag for all WinSCP related questions, along with .

271 questions
13
votes
5 answers

PowerShell runtime exception - "could not load file or assembly"

This seems to be a common problem in PowerShell and Visual Studio, yet cases and solutions seem to vary a lot. Though seeing several similar questions, I didn't find a working solution for my issue yet. The problem exists in the error message Could…
Mark Jenster
  • 453
  • 3
  • 6
  • 17
10
votes
3 answers

Powershell: Unable to find type when using PS 5 classes

I'm using classes in PS with WinSCP Powershell Assembly. In one of the methods I'm using various types from WinSCP. This works fine as long as I already have the assembly added - however, because of the way Powershell reads the script when using…
dbso
  • 526
  • 5
  • 14
8
votes
1 answer

WinSCP .NET assembly: Where to define proxy?

I am able to define the proxy server by using the WinSCP GUI. If I do this I am able to connect to a remote host. But in code I don't find a way to declare the proxy server for WinSCP. In this case I receive Remote server returned an error (407)…
deyaert
  • 101
  • 1
  • 3
7
votes
4 answers

SSH host key fingerprint does not match pattern C# WinSCP

I am trying to connect to an FTPS server using C# via WinSCP and I am getting this error: SSH host key fingerprint ... does not match pattern ... After tons of research, I believe is has something to do with the length of the key. The key I got…
user3690095
  • 341
  • 2
  • 4
  • 12
6
votes
3 answers

WinSCP: How to make sure SFTP upload gets renamed from .zip.filepart to .zip?

Using the .NET assembly of WinSCP to upload a file. OperationResultBase.Check() is throwing the following error: WinSCP.SessionRemoteException: Transfer was successfully finished, but temporary transfer file 'testfile.zip.filepart' could not be…
sigil
  • 8,744
  • 31
  • 107
  • 185
5
votes
2 answers

WinSCP .NET assembly: How to download directories

I wrote a application in C# that uses System.IO.GetDirectoires() and System.IO.GetFiles() I now have to convert that to use SFTP. I have experience with PutFiles and GetFiles of WinSCP .NET assembly, but I cannot figure out how to get a list of…
user3753693
  • 225
  • 1
  • 5
  • 13
5
votes
3 answers

WinSCP SFTP connection error

While accessing my remote server, from SFTP, I am constantly getting this error Connection has been unexpectedly closed. Server sent command exit status 0 I have filled same credentials in WinSCP, it is working fine. Where am I lacking? Also,…
Pranay Deep
  • 1,191
  • 1
  • 19
  • 41
5
votes
1 answer

Access remote file contents as a stream using WinSCP .NET assembly

I am trying to open file to read from SFTP using WinSCP .NET assembly as par to my exercise to archive file from SFTP to Azure blob. To upload a blob to Azure, I am using using (var fileStream = inputStream) { …
Mukil Deepthi
  • 4,272
  • 9
  • 49
  • 107
5
votes
1 answer

File upload with WinSCP .NET/COM with temporary filenames

I am creating a small .NET application in C# to upload files to an FTP Server. I am using the .NET DLL for WinSCP while doing this and i have been trying to find a good solution to my problem. The FTP folder where I will put all my files will be…
Arto Uusikangas
  • 1,781
  • 5
  • 19
  • 33
5
votes
2 answers

WinSCP .NET assembly refusing RSA/DSA key fingerprint

I am trying to connect up to a WinSCP server using the WinSCP .NET assembly. The problem I am having is that it bombs checking the host key fingerprint. I have created a RSA key. My code is as follows: var server = new…
Jim
  • 139
  • 2
  • 11
5
votes
2 answers

"No supported authentication methods available" while connecting to SFTP using WinSCP in C#

I'm trying to connect to a SFTP server using WinSCP in C#. This is my code: SessionOptions sessionOptions = new SessionOptions { Protocol = Protocol.Sftp, HostName = "ip", PortNumber = portNR, UserName = "username", Password =…
Lahib
  • 1,196
  • 5
  • 29
  • 60
4
votes
1 answer

"Upload of file '...' was successful, but error occurred while setting the permissions and/or timestamp" when using WinSCP .NET assembly in PowerShell

Exception calling "Check" with "0" argument(s): "Upload of file '2019-06-11.zip' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn off setting permissions or preserving…
user3542587
  • 199
  • 1
  • 13
4
votes
1 answer

How to fix NuGet WinSCP.NET in SSIS Script Task?

I'm trying to use the WinSCP.NET NuGet to upload some files to an SFTP through a Script Task component in SSIS. While writing the code everything went fine, but if after attempting to build, the WinSCP.NET dll seems to not be picked up breaking all…
Kross
  • 185
  • 2
  • 17
4
votes
1 answer

Method not found exception (EventWaitHandle..ctor) using WinSCP .NET

I am trying to connect to SFTP server using PowerShell, and using WinSCP .NET assembly. Code is not able to open the session ($session.Open($sessionOptions)). In the logs I found, Exception: System.MissingMethodException: Method not found: 'Void…
Ktn Patel
  • 101
  • 4
4
votes
2 answers

PowerShell SFTP Download without Writing Files to Disk

I am trying to use PowerShell to Sync Payroll files stored on SFTP to SharePoint. I have most of the code written, the only thing I can't figure out is if there is a way to avoid temporarily downloading the file to the disk. Given the sensitivity of…
Eric Weintraub
  • 648
  • 5
  • 17
1
2 3
18 19