Close open session and controlled destruction of object

Advertisement

Gomez
Donor
Joined:
Posts:
5
Location:
Austria

Close open session and controlled destruction of object

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

Reply with quote

Advertisement

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

Re: Close open session and controlled destruction of object

Are you calling Session.Dispose at the end?
_________________
Martin Prikryl

Reply with quote

Gomez
Donor
Joined:
Posts:
5
Location:
Austria

Re: Close open session and controlled destruction of object

martin 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.

Reply with quote

Advertisement

You can post new topics in this forum