Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

There's no hang in the log.

On what statement does the service hang?

Anyway the root cause is probably that the server blocks you after too many logins.
Guest

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

martin wrote:

The log shows just the connection. No renames. Are you starting a new session for each rename?


Yes, we were.
We are using BizTalk to pull files from a SFTP which we don't have delete rights, that's why we have to rename the file once it's grabbed by BizTalk in order to won't pull it again in the next run. Each file from the SFTP raises an instance in BizTalk and each instance was calling the WinSCPnet.dll for renaming the file (multithread), which didn't work. Then we moved it to a send port with OrderDelivery option (a queue) but the logic remained the same, each instance (file) was opening and closing a session; and this approach neither worked. In both scenarios we faced the same issue, the WinSCPnet.dll didn't throw any exception at all and it just hanged and locked the service instance until it was restarted manually by someone, and only then the file processing continued.

We came with a new approach, and now we have an orchestration in place, which collects all the file names in a period of time, creates a list with them, and from there we are calling the WinSCPnet.dll, opening the session, renaming all the files in the list and finally closing the session. This approach is working just fine!

But anyway, we are still concerned because of the issue we faced before with the other two approaches.

Any help is really appreciated.
Thank you.
martin

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

The log shows just the connection. No renames. Are you starting a new session for each rename?
RVidarte

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

martin wrote:

Please, enable debug logging (Session.DebugLogPath) and show us the log.


Here it is.

Thanks!
martin

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

Please, enable debug logging (Session.DebugLogPath) and show us the log.
RVidarte

WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

Hey,

I'm using the WinSCPnet.dll to rename files in a SFTP, and it is working, but after a few files renamed, the process hangs/locks the service which is invoking it and the exceptions are written in the log but they are never thrown back to the service.

Thanks in advance for the assistance you can provide.