Post a reply

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: Session.Open Error "The process cannot access the file 'C:\Users\[my username]\AppData\Local\Temp

I do not even see the error in the log.
The error should not be thrown out of WinSCP API, as this point. To me it looks like you have enabled "first-chance exception handling" in Visual Studio. I suggest you go to Debug > Windows > Exception Settings and click "Restore the list to the default settings".
bcummins

Session.Open Error "The process cannot access the file 'C:\Users\[my username]\AppData\Local\Temp

Hi, Thanks for reading my problem. Attached is my log file for the session.
Windows 10.
Application is VB.NET framework 4.8.
winscp.exe is 5.21.1.12643, product WinSCP version is 5.21.1.0

I am getting the error when running Visual Studio in debug mode when calling the Session.Open method.
The process cannot access the file 'C:\Users\[my username]\AppData\Local\Temp\wscp88A8.0342C81C.tmp' because it is being used by another process.'

I used to be able to open a session connection while debugging the application without getting this error but not sure what has changed?
If Not _winCpSession Is Nothing Then _winCpSession.Dispose()
_winCpSession = New Session
_winCpSession.Open(sessionOption)  ' Error occurs on this line.

Thank you for the help.