Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: How to set "Remote directory" when using C# / .dll for Amazon S3 connection?

This issue has been added to the tracker:
https://winscp.net/tracker/1778
MarisB

It works! Thank you :)
MarisB

How to set "Remote directory" when using C# / .dll for Amazon S3 connection?

Your help page: https://winscp.net/eng/docs/guide_amazon_s3
says that
You will not see buckets that were shared with you by another AWS user, in the root listing. To access such buckets, you have to specify /bucketname as an initial Remote directory, when setting up your S3 session. Similarly, when your access key does not have permissions to list buckets, you will need to specify the path to the desired bucket the same way. In scripting, you do that by appending the path to the bucket to a session URL: s3://accesskey:secretkey@s3.amazonaws.com/bucket/.


How to specify bucket in C#? I tried to feed it via SessionOptions.HostName (s3.region.amazonaws.com/bucket/), but it gives me an error: "Authentication failed. The request signature we calculated does not match the signature you provided. Check your key and signing method....."