S3 Session.Open failing on Session.HomePath
I am trying to get generated code to work in a VB Script, but it fails within the WinSCP DLL at
Below is the script with my access and secret removed, it is trying to access a public S3 site, so anyone can put in their Access Key and Secret and you should be able to access the site.
Session.HomePath
with this error
Any ideas ?"Session.HomePath' threw an exception of type 'System.InvalidOperationException' String {System.InvalidOperationException}"
Below is the script with my access and secret removed, it is trying to access a public S3 site, so anyone can put in their Access Key and Secret and you should be able to access the site.
' Set up session options Dim sessionOptions As New SessionOptions With sessionOptions .Protocol = Protocol.S3 .HostName = "s3.amazonaws.com" .UserName = "xxxxxxxxx" 'Access Key .Password = "xxxxxxxxxxxx" 'Secret End With sessionOptions.AddRawSettings("S3DefaultRegion", "us-east-1") sessionOptions.AddRawSettings("S3UrlStyle", "1") Using session As New Session ' Connect session.Open(sessionOptions) 'fails here ' Transfer files session.GetFiles("/gov-fpac-rma-pubfs-production/pub/References/actuarial_data_master/2023/2023_ADM_Daily_220815.zip", "C:\temp\*").Check() End Using