Topic "Copying files to remote side failed, Could not change to "/ftp:/"; 'ftp:' not found"

Author Message
[View user's profile]

Joined: 2015-08-03
Posts: 1
I continually get this error on the line of code noted below what could I be doing wrong? thank you all for everything!!!

{WinSCP.SessionRemoteException: Error transferring file '@"C:file\filename.txt"'. ---> WinSCP.SessionRemoteException: Copying files to remote side failed.
Could not change to "/ftp:/"; 'ftp:' not found.
--- End of inner exception stack trace ---
at WinSCP.OperationResultBase.Check()

<add key="FTPUrl" value=""/>
<add key="FTPUser" value="domain/username"/>
<add key="FTPPass" value="password"/>
<add key="FTPDomain" value="domain"/>

private static void transferWinSCP()
string userName = ConfigurationManager.AppSettings["FTPUser"];
string password = ConfigurationManager.AppSettings["FTPPass"];
string url = ConfigurationManager.AppSettings["FTPUrl"];
SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Ftp,
HostName = "",
PortNumber = 990,
UserName = userName,
Password = password,
FtpSecure = FtpSecure.Implicit,
FtpMode = FtpMode.Passive,
TlsHostCertificateFingerprint = "xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

using (Session session = new Session())

TransferOptions transferOptions = new TransferOptions {TransferMode = TransferMode.Binary};

TransferOperationResult transferResult = session.PutFiles(@"C:file\filename.txt",url, false,
I get the error on this line

transferResult.Check(); //ftp error

foreach (TransferEventArgs transfer in transferResult.Transfers)
Console.Write("upload of {0} succeeded", transfer.FileName);


catch (Exception ex)
Console.Write("error {0}", ex);
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25310
Location: Prague, Czechia
Your duplicate post on Stack Overflow:

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License