Amazon API-请求必须包含参数Signature

时间:2016-06-07 13:07:35

标签: c# amazon-product-api

每当我尝试执行搜索时,我都会收到一个未处理的SOAP异常,声明请求必须包含参数签名。

执行以下操作时会发生这种情况:

ItemSearchResponse response = service.ItemSearch(request);

AWSECommerceService cs = new AWSECommerceService();

ItemSearchRequest request = new ItemSearchRequest();
request.SearchIndex = "Books";
request.Title = "asp.net";
request.ResponseGroup = new string[] { "small"};

ItemSearch search = new ItemSearch();
search.AssociateTag = "";
search.Request = new ItemSearchRequest[] { request };
search.AWSAccessKeyId = "";
search.Request = new ItemSearchRequest[] { request };
try
{
    ItemSearchResponse res = cs.ItemSearch(search);
    foreach (var item in res.Items[0].Item)
    {
        Response.Write(item.ItemAttributes.Title + "<br>");
    }
}
catch (Exception ex)
{
    Label1.Text = ex.Message;
}

我真的不知道如何解决这个问题。有任何想法吗?

0 个答案:

没有答案