Error occurred while setting the permissions and/or timestam
So I got the infamous error: "Upload of File 'filename' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permissions errors' option."
I'm using Visual Studio Express 2012 to compile a Visual Basic Windows Forms Application, using Using the WinSCP 5.2.4 beta portable executable and .NET assembly / COM library.
I've added the following:
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off
transferOptions.PreserveTimestamp = False
transferOptions.FilePermissions = null
The third line produces the following error: 'null' is not declared. 'Null' constant is no longer supported; use 'System.DBNull' instead
Recommendation: Replace 'Null' with 'DBNull.Value'.
When I make this recommended change, I get the following error: "Value of type 'System.DBNull' cannot be converted to 'WinSCP.FilePermissions'.
I tried various options, like vbNull, vbNullString, vbNullChar, "", and 0 - none of which can be converted to 'WinSCP.FilePermissions'.
-----------------------------------------------------------------------------------------------------
I am able to use the GUI version, and successfully upload with the following settings:
"Set permissions" was already unchecked
Unchecked "Preserve timestamp"
Set "Enable transfer resume/transfer to temporary filename for" to Disable
I've also tried
session.DefaultConfiguration = False and session.IniFilePath with a working .ini file, and still get the same error in Visual Studio.
Does anyone know how to set a null value for transferOptions.FilePermissions in vb.net (that won't produce an error), or know of anything else I can try to get it working with the .ini file?
Thanks!
I've already reviewed: https://winscp.net/eng/docs/faq_not_owner and https://winscp.net/eng/docs/message_preserve_time_perm - and neither has helped unfortunately.
I'm using Visual Studio Express 2012 to compile a Visual Basic Windows Forms Application, using Using the WinSCP 5.2.4 beta portable executable and .NET assembly / COM library.
I've added the following:
transferOptions.ResumeSupport.State = TransferResumeSupportState.Off
transferOptions.PreserveTimestamp = False
transferOptions.FilePermissions = null
The third line produces the following error: 'null' is not declared. 'Null' constant is no longer supported; use 'System.DBNull' instead
Recommendation: Replace 'Null' with 'DBNull.Value'.
When I make this recommended change, I get the following error: "Value of type 'System.DBNull' cannot be converted to 'WinSCP.FilePermissions'.
I tried various options, like vbNull, vbNullString, vbNullChar, "", and 0 - none of which can be converted to 'WinSCP.FilePermissions'.
-----------------------------------------------------------------------------------------------------
I am able to use the GUI version, and successfully upload with the following settings:
"Set permissions" was already unchecked
Unchecked "Preserve timestamp"
Set "Enable transfer resume/transfer to temporary filename for" to Disable
I've also tried
session.DefaultConfiguration = False and session.IniFilePath with a working .ini file, and still get the same error in Visual Studio.
Does anyone know how to set a null value for transferOptions.FilePermissions in vb.net (that won't produce an error), or know of anything else I can try to get it working with the .ini file?
Thanks!
I've already reviewed: https://winscp.net/eng/docs/faq_not_owner and https://winscp.net/eng/docs/message_preserve_time_perm - and neither has helped unfortunately.