[newbie] Affirma.ThreeSharp.ThreeSharpException: The request signature we calculated does not match the signature you provided. Check your key and signing method..

Dec 2, 2008 at 4:21 AM
Hi, 

I just downloaded the library and I am using the ThreeSharpWrapper class out of the box. I run into the following error. How/where to setup the signature?

Thanks!

Test method S3UploadTaskTest.S3UploadCallbackTest threw exception: Affirma.ThreeSharp.ThreeSharpException: The request signature we calculated does not match the signature you provided. Check your key and signing method..
Affirma.ThreeSharp.Query.ThreeSharpQuery.ThrowIfErrors(HttpWebResponse httpWebResponse)Affirma.ThreeSharp.Query.ThreeSharpQuery.Invoke[T](Request request)Affirma.ThreeSharp.Query.ThreeSharpQuery.ObjectAdd(ObjectAddRequest request)Affirma.ThreeSharp.Wrapper.ThreeSharpWrapper.AddEncryptFileObject(String bucketName, String keyName, String localfile, String encryptionKey, String encryptionIV)
Feb 18, 2009 at 2:21 PM
I am getting the same error, but not with all file types.
This was working yesterday, and not today. Very weird.

Also, I do not think this has anything to do with your keys (as I said, I am able to upload "some" files) so that could not be the issue here.
Feb 24, 2009 at 5:57 PM
I finally found the problem... this was another totally DUH moment.
In my case, I was passing a filepath (including the name of the file without extension) to the KeyName parameter of the "ObjectAddRequest" method.
Depending on the file name, this key contained spaces... and yes, amazon does not like spaces for a key. So a quick replace fixed my issue.

objectAddRequest As New ObjectAddRequest(bucketName, keyName.Replace(" ", "_")

I hope this helps someone!
Mar 24, 2009 at 3:34 PM
I'm experiencing this problem with any keyName that includes special characters(spaces, underscores, brackets, etc).

I've also tried to URLEncode the keyName as such  objectAddRequest As New ObjectAddRequest(bucketName, HttpUtility.UrlEncode( keyName))

with no success

I can't change the names of my files. Does anyone have any advice? 

Jul 8, 2009 at 11:39 AM

Hi,

I have this error when I upload a file containing special characters or spaces. But with S3Fox there is no problem, so I think it exists a solution.

Anyone have an idea ?

And where can we find the format of key names to respect ?

Jul 16, 2009 at 5:44 AM

Same problem. If the key contains any  / or \ slash we get the error:

Affirma.ThreeSharp.ThreeSharpException: The request signature we calculated does not match
the signature you provided. Check your key and signing method.

Jul 16, 2009 at 11:10 AM

Our only issue so far has been spaces in key names, which we've been able to work around by amending transfer.cs in the main library, and replacing " " with "%20". I don't know the full list of characters that don't work, but perhaps manually changing certain characters to the % equivalents would help?

Jul 16, 2009 at 7:41 PM

I am running into the same issue.  I had a Secret Key that has // and a + in it, so I generated a new one, and I am still getting the same error.  The Access Keya and Secret Key work in other apps, including in my own SOAP based calls that I was trying out.

Any help is greatly appreciated!

Mark

 

Jan 31, 2010 at 2:50 PM

Make sure you wrap your request strings with System.Web.HttpUtility.UrlEncode() to be sure spaces and other things are properly converted for the web!