We have an application which runs on Windows 2012 R2 that accesses a fileshare running on 2016 R2, and execute Winscp from there. The application launches it using the service account, and most of the time it works. However, at random, it fails to launch the exe file, causing all the jobs to fail. Once it failed, then all the subsequent opens, either by a user or the application fails, with a network error, as shown in error.jpg. This is from event viewer.
But it is confirm that there is no network error, as we can navigate through the fileshare, open other files etc.
The workaround is to kill all the existing winscp processes. Once all the other sessions are killed, then it is able to open the file. So I ran procmon when it was failing, and when it is working fine. I compared them using excel, and the output is attached as comparison.jpg. It is shown as NETWORK ERROR, which seems not to be the case.
Killing all the processes is not a solution that we want to do, as it will affect all other jobs.Also, storing the winscp in local is also not an option due to application dependencies. We have tried 5.5.3 and 5.13.7, both giving the same problem.
How can i fix this ?