title: Amazon product advertising api - c# sample
body: <p>So I have been trying to get these API samples to work for three frustrating days. So far I still have had no success. I have tried about 10 different samples and of course none of them work. With some more digging the most up to date API I found was from april 2013 end even recent comments said that it worked. I knew it was just too good to be true and of course I didn't get it to work. I am pretty sure that i am missing something in that program.</p>
  
  <p>here is the code:</p>
  
  <pre><code>namespace Amazon.PAAPI
  {
      class Program
      {
  
          static void Main(string[] args)
              {
  
              // Instantiate Amazon ProductAdvertisingAPI client
              AWSECommerceServicePortTypeClient amazonClient = new AWSECommerceServicePortTypeClient();
  
  
              // prepare an ItemSearch request
              ItemSearchRequest request = new ItemSearchRequest();
              request.SearchIndex = "Books";
              request.Title = "WCF";
              request.ResponseGroup = new string[] { "Small" };
  
              ItemSearch itemSearch = new ItemSearch();
              itemSearch.Request = new ItemSearchRequest[] { request };
              itemSearch.AWSAccessKeyId = ConfigurationManager.AppSettings["accessKeyId"];
              itemSearch.AssociateTag = "ReplaceWithYourValue";
  
              // send the ItemSearch request
              ItemSearchResponse response = amazonClient.ItemSearch(itemSearch);
  
              // write out the results from the ItemSearch request
              foreach (var item in response.Items[0].Item)
              {
                  Console.WriteLine(item.ItemAttributes.Title);
              }
              Console.WriteLine("done...enter any key to continue&gt;");
              Console.ReadLine();
  
          }
      }
  }
  </code></pre>
  
  <p>I get an error: The HTTP request was forbidden with client authentication scheme 'Anonymous'.</p>
  
  <p>I did insert the <code>AssociateTag</code> value and the access key id but still it gives the same results.</p>
  
  <p>here is the link i downloaded it from: <a href="http://dl.dropbox.com/u/119018/amazonProductAdvertisingAPI-SOAP-WCF-Updated.zip" rel="nofollow">http://dl.dropbox.com/u/119018/amazonProductAdvertisingAPI-SOAP-WCF-Updated.zip</a></p>