Hello,
WinSCP.exe file version: 5.21.1.12643 Product Version: 5.21.1.0
WinSCPnet.dll File version: 1.11.0.12643 Product Version: 5.21.1.0
Windows VB.NET application using 4.8 .NET framework.
We are having an intermittent issues when exporting 800 HTML files to a SFTP server. About 80% of the transfers complete without any error while roughly 20% of the transfers contain the errors listed below.
When we do get errors, then the errors usually report different file names that have the timestamp issue. There doesn't seem to be a pattern why some transfers complete without errors while others raise an error for what appears to be random files.
VB.NET code that creates the SFTP connection:
With sessOptions
.Protocol = WinSCP.Protocol.Sftp
.HostName = serverDetails.IPAddress.Trim
.UserName = serverDetails.UserName.Trim
.Password = serverDetails.Password.Trim
.SshHostKeyFingerprint = serverDetails.SFTPKey.Trim
Dim transOptions As New TransferOptions
transOptions.TransferMode = TransferMode.Binary
transOptions.OverwriteMode = OverwriteMode.Overwrite
transOptions.PreserveTimestamp = True
transOptions.AddRawSettings("IgnorePermErrors", "1")
transOptions.ResumeSupport.State = TransferResumeSupportState.Off
Dim transferResult As TransferOperationResult = sess.PutFiles(dmzPath, "/" + serverDetails.WebServerFolderPath, False, transOptions)
transferResult.Check()
Please help since this is causing issue with IIS caching the previous file loaded and not displaying the latest information to the public users on the web site. Thank you.
11/08/2022 09:16:51 PM
TRANSFER NAME: Results 2022GG Production ERROR: **Upload of file 'gen_results_2022_by_county_23.html' was successful, but error occurred while setting the permissions and/or timestamp.**
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
General failure (server should provide error description).
Error code: 4
Error message from server (en-US):
Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.--WinSCPnet--WinSCP.SessionRemoteException: **Upload of file 'gen_results_2022_by_county_23.html' was successful, but error occurred while setting the permissions and/or timestamp.**
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
General failure (server should provide error description).
Error code: 4
Error message from server (en-US):
Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.
at WinSCP.OperationResultBase.Check()
at MDCVRFileTransfer.CVRFileTransfer.TransferFiles(AemsWebServerDetailsDO& serverDetails, String dmzPath, String configPath) ||
TRANSFER NAME: Election Night 151 ERROR: **Upload of file 'gen_results_2022_by_county_6.html' was successful, but error occurred while setting the permissions and/or timestamp.**