Topic "Close open session and controlled destruction of object"

Author Message
Gomez
[View user's profile]
Donor
Joined: 2012-02-28
Posts: 5
Location: Austria
Hi,

i have tested the .Net (VS2010) and Com(VB6) library and i am amazed of the offered functions, especially the function SyxnchronizeDirectories. After playing a while i have faced the problem that the object does not close the connection automatically, the error message

Server sent disconnect message
type 11 (by application):
"This session would exceed your concurrent session limit. Please disconnect one or more of your existing sessions and try again."

is thrown while trying to connect. I have not found a function or method to disconnect the session. Please help.

The second problem i have is, that with VB6 the WinSCP.exe remains alive even after closing the VB6-IDE. I need to know how to destroy the object after using it. I have enclosed a little screen shot from the process explorer.
scp.jpg (39.43 KB)

Description: (none)

scp.jpg

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Are you calling Session.Dispose at the end?
_________________
Martin Prikryl
Gomez
[View user's profile]
Donor
Joined: 2012-02-28
Posts: 5
Location: Austria
prikryl wrote:
Are you calling Session.Dispose at the end?


No, but thanks for the hint. Wink The Dispose method does not only kills the underlying WinSCP process; it also disconnects the open connection.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Documentation for Session.Dipose method has been added:
https://winscp.net/eng/docs/library_session_dispose

As well as documentation on using the WinSCP .NET assembly from VBA:
https://winscp.net/eng/docs/library_vb
_________________
Martin Prikryl
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