Using Amazon web services

I found this great post: http://www.seesharpdot.net/?p=157. However, the code is not 100% correct. My fix is marked in bold red. Few extra remarks:
  • You have to disable the BindingFailure exception in the Visual Studio Debugger. This is a long outstanding issue with the Xml Serializer.
  • You actually don't have to install the Amazon webservices .NET SDK.
  • I removed my public and private key to access Amazon information. Please fill in your own here.

         ....
            if (itemFound)
            {
                List images = new List();

                foreach (Item currItem in response.Items[0].Item)
                {
                    try
                    {
                        if (currItem.LargeImage != null)
                        {
                            images.Add(ConvertByteArrayToImage(GetBytesFromUrl(currItem.LargeImage.URL)));
                        }

                    }
                    catch { }
                }
               
                return images;
            }
            else
            {
                return null;
            }
      ..........

Comments