Any42 Lim

Any42 Lim

  • 1.7k
  • 51
  • 1.5k

C# NET SFTP- WinSCP Temp folder session exception

Dec 10 2014 7:52 AM
Hi I have a WinScp SFTP code as below to check session.
 
 
          using (Session session = new Session())
                {
                 
                    session.Open(sessionOptions);
                    Exists = session.FileExists(filePath);

                    session.Abort();
                    session.Dispose();
                }
 
However, sometime i will facing error:-
 
#
SessionLocal Exception: There are too many (6454xx) ???.tmp* file in your temporary folder, please delete some....
#
 
 
After i delete some tmp file from C:\User\Admin\Local\Temp\2, it work
 
 
Any good solution?