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

Advertisement

bcummins
Joined:
Posts:
10

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

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".

Reply with quote

Advertisement

You can post new topics in this forum