WinSCP process terminated with exit code -1073741515 (C0000135)

Advertisement

abraham.dominic
Joined:
Posts:
4
Location:
India

WinSCP process terminated with exit code -1073741515 (C0000135)

While a session is opened and trying to upload or download a file from SFTP, it does not work. Instead, an error message pops up saying:
System.Exception: Unable to connect FTP location , WinSCP.SessionLocalException: WinSCP process terminated with exit code -1073741515 (C0000135). There was no output. Response log file C:\Windows\Temp\wscp660C.001DC84D.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself. at WinSCP.Session.Open(SessionOptions sessionOptions) at
The .NET component is hosted on mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 containers and recently migrated to .NET 5 and is running on mcr.microsoft.com/dotnet/aspnet:5.0. the containers are hosted on AWS EKS windows nodes. the application is working locally when debugged using Visual Studio.

Since it is an access denied issue, I ran container under USER ContainerAdministrator and also tried to provided explicit access using corresponding folders using icacls from docker file; still issue persist. pls note that component it self has access to write to temp folder but WinSCP.exe.
RUN c:\windows\system32\icacls "c:\app" /grant "everyone":(OI)(CI)F
RUN c:\windows\system32\icacls "c:\windows\temp" /grant "everyone":(OI)(CI)F
RUN c:\windows\system32\icacls "c:\app\jobapi\temp" /grant "everyone":(OI)(CI)F
RUN c:\windows\system32\icacls "c:\app\jobapi\WinSCP.exe" /grant "everyone":(OI)(CI)F
Using WinSCP 5.19.2 NuGet package. Application is developed on .NET 5.

Has any one encountered such an issue? kindly support.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
36,205
Location:
Prague, Czechia

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

Why do you think it's an "access denied" issue? The C0000135 seems to mean "Unable to locate component".

Reply with quote

abraham.dominic
Joined:
Posts:
4
Location:
India

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

It is throwing the error
Exception occurred while downloading file from sftp server dev.sftp.xyz.com/sftp-bucket-dev/ - EDI_Deals ErrorMessage: Unable to connect FTP location , WinSCP.SessionLocalException: WinSCP process terminated with exit code -1073741515 (C0000135). There was no output. Response log file c:\app\jobapi\logs\ was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
when checked all components are included in the package built and deployed. is there any way to understand which component is missing?

Reply with quote

martin
Site Admin
martin avatar

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

Please give us instructions for reproducing the problem. How exactly did you deploy your project and WinSCP to that system?

Reply with quote

abraham.dominic
Joined:
Posts:
4
Location:
India

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

Created .NET 5 project. Referenced WinSCP NuGet package and upload a file to SFTP location. Application is deployed to Docker Desktop and to Windows container. Docker Desktop is running under WSL2 mode. Attached here with the docker and WinSCP xml log file for your reference.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

When I build your Dockerfile, I get "Linux 5.10.16.3-microsoft-standard-WSL2" system. Not a Windows system.

Reply with quote

abraham.dominic
Joined:
Posts:
4
Location:
India

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

you might need to change the docker desktop setting to switch to Windows containers and build it.
  • MicrosoftTeams-image.png (12.08 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Re: WinSCP process terminated with exit code -1073741515 (C0000135)

Sorry, it took me while to test this. After switching to Windows containers, everything works. I do not get the error your are describing. I've used very basic WinSCP .NET code, like the one here:
https://winscp.net/eng/docs/library#csharp
I did not need to set any permissions or anything else.

Reply with quote

Advertisement

You can post new topics in this forum