How does the app use the assembly? Does it open one (or few) sessions per run? Or is it opening new sessions repeatedly/continuously? When it fails, does it fail for all sessions within the app run? Or randomly?
Please upgrade to the latest version of WinSCP and post debug logs or both a successful and fails session.
Also, this might be related to your problem:
Issue 2075 – Prevent occasional exhaustion of resources while testing WinSCP executable version on repeated use of .NET assembly
Please upgrade to the latest version of WinSCP and post debug logs or both a successful and fails session.
Also, this might be related to your problem:
Issue 2075 – Prevent occasional exhaustion of resources while testing WinSCP executable version on repeated use of .NET assembly