Trying to upload to SFTP server. It fails to session.open with:
System.UnauthorizedAccessException: Access to the path 'WinSCPConsoleEventRequest_6212_39451090_247' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Threading.EventWaitHandle..ctor(Boolean initialState, EventResetMode mode, String name, Boolean& createdNew, EventWaitHandleSecurity eventSecurity)
at WinSCP.ExeSessionProcess.TryCreateEvent(String name, EventWaitHandle& ev)
at WinSCP.Session.Open(SessionOptions sessionOptions)
I don't see anything denied in Procmon. The code worked previously but installing in new environment gave error. This session is created inside a .NET console application.