Topic "Error: Exception: System.IO.IOException"

Author Message
curvetech
[View user's profile]

Joined: 2012-05-14
Posts: 3
When I try to open a session i get the following error in my logs

[2012-05-11 13:25:19Z] [0004] Executing Assembly: WinSCP, Version=1.0.0.235, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXX; Path: D:/XmlProcessorService/bin/WinSCP.DLL; Location: D:\XmlProcessorService\bin\WinSCP.dll; Product: 5.0.6.0
[2012-05-11 13:25:19Z] [0004] Entry Assembly: XMLProcessorService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[2012-05-11 13:25:19Z] [0004] Operating system: Microsoft Windows NT 5.2.3790 Service Pack 1
[2012-05-11 13:25:19Z] [0004] User: _svc_maed@XXXXXXXXXX@XXXXXXXXXX; Interactive: False
[2012-05-11 13:25:19Z] [0004] Runtime: 2.0.50727.1433
[2012-05-11 13:25:19Z] [0004] Console encoding: Input: Western European (Windows) (1252); Output: Western European (Windows) (1252)
[2012-05-11 13:25:19Z] [0004] Session.Open entering
[2012-05-11 13:25:28Z] [0004] Exception: System.IO.IOException: The file exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.Path.GetTempFileName()
at WinSCP.Session.Open(SessionOptions sessionOptions)
[2012-05-11 13:25:28Z] [0004] Session.Cleanup entering
[2012-05-11 13:25:28Z] [0004] Session.Cleanup leaving
[2012-05-11 13:25:28Z] [0004] Session.Open leaving
[2012-05-11 13:25:28Z] [0004] Session.Open entering
[2012-05-11 13:25:37Z] [0004] Exception: System.IO.IOException: The file exists.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.Path.GetTempFileName()
at WinSCP.Session.Open(SessionOptions sessionOptions)
[2012-05-11 13:25:37Z] [0004] Session.Cleanup entering
[2012-05-11 13:25:37Z] [0004] Session.Cleanup leaving
[2012-05-11 13:25:37Z] [0004] Session.Open leaving
[2012-05-11 13:25:37Z] [0004] Session.PutFiles entering
[2012-05-11 13:25:37Z] [0004] Session.PutFiles leaving
[2012-05-11 13:25:37Z] [0004] Session.Dispose entering
[2012-05-11 13:25:37Z] [0004] Session.Cleanup entering
[2012-05-11 13:25:37Z] [0004] Session.Cleanup leaving

I've noticed that it is in consistent in that the same code will produce different results depending on the computer is is being run from. On my machine I have no problem establishing a connection to the remote server. When I run my code from my production server I get the above error. Any help would be greatly appreciated.


I am doing this using the SFTP protocol and the Win SCP .Net assembly version 5.0.6.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
5.0.6 failed to remove the temporary files from Temp folder. So you may have run out of temp files sequence number (having 65535 temp files already). Please check your temp folder and upgrade to 5.0.7, which cleans the temp files properly:
https://winscp.net/tracker/show_bug.cgi?id=849
_________________
Martin Prikryl
curvetech
[View user's profile]

Joined: 2012-05-14
Posts: 3
We have upgraded to 5.0.7 and are still running into this issue. I've looked into the c:\windows\temp folder and I don't see any *.tmp files that need to be cleared out. I'm running this as a windows service and I've checked the permissions that the service is running under and it has read and write permissions to the folder.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please check folder where %TEMP% points to. Should be like C:\Users\username\AppData\Local\Temp, but may vary depending on version of Windows.
_________________
Martin Prikryl
curvetech
[View user's profile]

Joined: 2012-05-14
Posts: 3
Deleting the tmp files and upgrading to 5.0.7 solved the issues.
Thanks for your help!
gunnerit
[View user's profile]

Joined: 2012-06-14
Posts: 2
Location: Ha Noi - Viet Nam
I have upgrade to 5.0.7 and deleted all temp file in %TEMP% .
But it's still error.
Please help me.
Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Make sure you delete contents of directory returned by Path.GetTempPath()
Let me know.
_________________
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