Topic "Upload 200KB files via WINSCP .NET assembly"

Author Message
nishalkr

Guest


I am using WINSCP .NET assembly to upload files via SFTP. On uploading any files larger than 100kb, getting error messages "filepart' could not be renamed to target file name, you may try to turn off transfer resume support.". In the .NET source code I added following code to disable the settings:

sessionOptions.AddRawSettings("ResumeSupport", "2")
sessionOptions.AddRawSettings("IgnorePermErrors", "1")
sessionOptions.AddRawSettings("PreserveTime", "0")

But still I am getting the same error message. While uploading it though GUI, I am not facing any issues, but using .NET assembly. I am not able to upload large files.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Thanks for your post.

This issue is being tracked here:
http://winscp.net/tracker/show_bug.cgi?id=834

See hint at:
http://winscp.net/forum/viewtopic.php?t=11460
_________________
Martin Prikryl
nishalkr

Guest


I have downloaded 5.1.3 version of WINSCP.DLL to work with .NET. Use following code to ignore the error messages "filepart' could not be renamed to target file name. We don't have rename permission to the destination SFTP folder.
With sessionOptions
.Protocol = Protocol.Sftp
.HostName = FTPAddr
.UserName = FtpUserId
.Password = FTPPassword
.PortNumber = FTPPort
.SshHostKeyFingerprint = sshHostKey
.AddRawSettings("ResumeSupport", "2")
.AddRawSettings("IgnorePermErrors", "1")
.AddRawSettings("PreserveTime", "0")
End With
Let me know, if this issue is fixed already with 5.1.3 version ?

Thank you.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
nishalkr wrote:
Let me know, if this issue is fixed already with 5.1.3 version ?

It's not. Will be fixed in 5.2, as per the tracker entry above.
nishalkr

Guest


prikryl wrote:
nishalkr wrote:
Let me know, if this issue is fixed already with 5.1.3 version ?

It's not. Will be fixed in 5.2, as per the tracker entry above.


Any idea on the release date of 5.2
joey

Guest


Any idea on the release date of 5.2 or beta release? Or, a way to get around the Resume Support using the .Net assembly, Or, even a trial piece of CPP to allow local builds to resolve?
Product is still awesome!!!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
joey wrote:
Any idea on the release date of 5.2 or beta release? Or, a way to get around the Resume Support using the .Net assembly, Or, even a trial piece of CPP to allow local builds to resolve?
Product is still awesome!!!

I can provide you development version for testing. Can you send me an email? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
rad032
[View user's profile]

Joined: 2013-02-28
Posts: 2
Location: USA
I'm also in need of the #834 bug fix; is there anyway I can get a copy?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
rad032 wrote:
I'm also in need of the #834 bug fix; is there anyway I can get a copy?

See my answer above.
rad032
[View user's profile]

Joined: 2013-02-28
Posts: 2
Location: USA
prikryl wrote:
rad032 wrote:
I'm also in need of the #834 bug fix; is there anyway I can get a copy?

See my answer above.



email sent, thanks!
hjackows
[View user's profile]

Joined: 2013-02-22
Posts: 1
Location: austin
I just downloaded version 5.2 and I am still seeing the same issue .File could not be renamed..
Am I disabling the resume support correctly ?

SessionOptions sessionOptions = new SessionOptions()
{
Protocol = Protocol.Sftp,
HostName = ConfigurationManager.AppSettings["sftp.host"],
UserName = ConfigurationManager.AppSettings["sftp.userName"],
Password = ConfigurationManager.AppSettings["sftp.password"],
SshHostKeyFingerprint = ConfigurationManager.AppSettings["sftp.SshHostKeyFingerprint"],
};

sessionOptions.AddRawSettings("ResumeSupport", "2");
sessionOptions.AddRawSettings("IgnorePermErrors", "1");
sessionOptions.AddRawSettings("PreserveTime", "0");

Thanks
Henry
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
hjackows wrote:
I just downloaded version 5.2 and I am still seeing the same issue .File could not be renamed..
Am I disabling the resume support correctly ?

No you are not.
Use TransferOptions.ResumeSupport = TransferResumeSupport.Off
http://winscp.net/eng/docs/library_transferoptions

Last edited by martin on 2014-04-14; edited 1 time in total
fightingfit99
[View user's profile]

Joined: 2013-04-11
Posts: 2
Location: York
prikryl wrote:
hjackows wrote:
I just downloaded version 5.2 and I am still seeing the same issue .File could not be renamed..
Am I disabling the resume support correctly ?

No you are not.
Use TransferOptions.ResumeSupport = TransferResumeSupport.Off


Hi, I've just tried this I'm getting a message that the ResumeSupport property is readonly. Can you help? Full code:

Dim sftp As New SessionOptions
Dim session As New Session
Dim transfer As New TransferOptions
Dim result As TransferOperationResult

With sftp
.Protocol = Protocol.Sftp
.HostName = "***"
.UserName = "***"
.Password = "***"
.SshHostKeyFingerprint = "***"
End With

session.Open(sftp)
transfer.ResumeSupport = TransferResumeSupport.Off [property is readonly]
transfer.TransferMode = TransferMode.Binary
result = session.PutFiles("C:\xx.csv", "xx.csv", False, transfer)
result.Check()

Thank you.
fightingfit99
[View user's profile]

Joined: 2013-04-11
Posts: 2
Location: York
fightingfit99 wrote:
prikryl wrote:
hjackows wrote:
I just downloaded version 5.2 and I am still seeing the same issue .File could not be renamed..
Am I disabling the resume support correctly ?

No you are not.
Use TransferOptions.ResumeSupport = TransferResumeSupport.Off


Hi, I've just tried this I'm getting a message that the ResumeSupport property is readonly. Can you help? Full code:

Dim sftp As New SessionOptions
Dim session As New Session
Dim transfer As New TransferOptions
Dim result As TransferOperationResult

With sftp
.Protocol = Protocol.Sftp
.HostName = "***"
.UserName = "***"
.Password = "***"
.SshHostKeyFingerprint = "***"
End With

session.Open(sftp)
transfer.ResumeSupport = TransferResumeSupport.Off [property is readonly]
transfer.TransferMode = TransferMode.Binary
result = session.PutFiles("C:\xx.csv", "xx.csv", False, transfer)
result.Check()

Thank you.


Don.t worry, fixed it myself:

transfer.ResumeSupport.State = TransferResumeSupportState.Off
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License