Pause/Resume File Transfer

Advertisement

AvidApprentice
Joined:
Posts:
1

Pause/Resume File Transfer

Perhaps I am overlooking it but I cannot seem to find anything regarding pausing/resuming of file transfers. Does the .NET assembly currently have the ability to do this? If not is it on the road map?

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Pause/Resume File Transfer

No, it is not possible.
_________________
Martin Prikryl

Reply with quote

t0r3x
Joined:
Posts:
12
Location:
Netherlands

How would you cancel a transfer you are doing with WinSCP.Session.GetFiles then? Simply a dispose (does not seem to work when I checked real quick)?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

t0r3x wrote:

How would you cancel a transfer you are doing with WinSCP.Session.GetFiles then? Simply a dispose (does not seem to work when I checked real quick)?
Well, again, it is not possible.
_________________
Martin Prikryl

Reply with quote

t0r3x
Joined:
Posts:
12
Location:
Netherlands

Thats to bad, is there maybe some kind of workaround for at least an abort/cancel? It is absolutely critical that I can somehow terminate a download over the SCP protocol or else my entire implementation becomes useless and my solution will sadly fall apart.

I would guess disposing the session also terminates the WinSCP.exe on the background, but when I try to do that everything just hangs, probably because the connection stays in an open state. I have also been looking at doing things manually with the ExecuteCommand method, using the scp command, but couldnt get things going with the identity file yet (Windows/Unix paths). I dont know if it will even make a difference eventually, because it will basicly be the same command I have to send that terminates the download thread.

Like I said, a big part of my program is depending on the WinSCP .NET assembly. The program I am developing uploads files via RSync and downloads via WinSCP, for storing backups on a NAS box. The RSync wrapper has not been a problem, but all now seems to come down to cancelling the download thread and disposing the session via WinSCP. I cannot have a very big file not being able to abort with a download of lets say 200 kb/s, it would kill the usability of my application. So please, if you would know anything at all that could maybe help me achieving an abort/cancel it would be greatly appreciated and would help me tremendously. Thanks a million in advance.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Disposing should help.
Please set Session.DebugLogPath, try and attach the log.
_________________
Martin Prikryl

Reply with quote

t0r3x
Joined:
Posts:
12
Location:
Netherlands

martin wrote:

Disposing should help.
Please set Session.DebugLogPath, try and attach the log.

The order of events in my program is as follows. I start up a thread in the ThreadPool with session.GetFiles in it, then the thread keeps working until done downloading. When I want to cancel downloading, I do a session.Dispose on the same session object, but then it still keeps working until done with downloading. After that it does dispose, but only when done downloading. I dont quite know how to tackle this situation currently, so any tips or guidance would be greatly appreciated. To be sure I attached the log as you asked. Thanks.
Description: debug log winscp .net assembly

Reply with quote

t0r3x
Joined:
Posts:
12
Location:
Netherlands

t0r3x wrote:

martin wrote:

Disposing should help.
Please set Session.DebugLogPath, try and attach the log.

The order of events in my program is as follows. I start up a thread in the ThreadPool with session.GetFiles in it, then the thread keeps working until done downloading. When I want to cancel downloading, I do a session.Dispose on the same session object, but then it still keeps working until done with downloading. After that it does dispose, but only when done downloading. I dont quite know how to tackle this situation currently, so any tips or guidance would be greatly appreciated. To be sure I attached the log as you asked. Thanks.

The more I seem to try, the more Im starting to think its a limitation in the library. Like I said earlier, when I dispose it disposes but only after having finished with GetFiles. GetFiles therefore seems uninterruptable when being executed until finished. Do you have any more information about this yet? Thanks.

Reply with quote

Advertisement

You can post new topics in this forum