Release: AWS SDK for .NET 1.0.5

Release Notes>.NET>Release: AWS SDK for .NET 1.0.5
Changes in this release include the Petboard ASP.NET code sample and support for Amazon SimpleDB consistent puts, and conditional puts & deletes.

Details

Submitted By: Craig@AWS
Release Date: February 24, 2010 12:00 AM GMT
Created On: February 25, 2010 12:20 AM GMT
Last Updated: February 25, 2010 1:03 AM GMT

What's New?

ChangeDescription
New Petboard code sample The Petboard sample application shows how to Amazon Web Services in an ASP.NET application. The web application is a catalog of pets and information about each pet, including a profile photo, likes, and dislikes. Petboard shows how to organize structured data using Amazon SimpleDB, serve images from Amazon Simple Storage Service (S3), and implement ASP.NET Membership using Amazon SimpleDB. You can access the Petboard sample from the /samples folder.
New ways to access the AWS SDK for .NET library There are two new ways to access the AWS SDK for .NET library:
  • AWSSDK.dll is installed in the Global Assembly Cache (GAC), in addition to the /bin directory. If a project references a hard-coded path to AWSSDK.dll, and the DLL is not found in the location specified, AWSSDK.dll is loaded from the GAC.
  • The AWSSDK.dll is now in the list of .NET binaries displayed by the "Add Reference" dialog box.
Improvements to code samples The code samples are now available uncompressed in the installation directory.
Support for new Amazon SimpleDB features The AWS SDK for .NET now supports Amazon SimpleDB consistent reads, and conditional puts & deletes.
Support for Amazon SimpleDB base64-encoded attribute name, attribute value, and item names XML does not support certain Unicode characters (the NUL character, anything in XML's RestrictedChar category, and permanently undefined Unicode characters). To ensure that you can read all the data you sent via the SimpleDB API, if a response contains invalid XML characters, Amazon SimpleDB automatically Base64-encodes the UTF-8 octets of the text.

To simplify the task of using base64 encoded values, a number of helper methods have been added to AmazonSimpleDBUtils.cs:

  1. DecodeItem
  2. DecodeItems
  3. DecodeAttrubute
  4. DecodeAttributes

This code sample demonstrates how these helper functions can be used:

SelectRequest request = new SelectRequest();
request.WithSelectExpression("select * from `mydomain`");
request.ConsistentRead = true;
SelectResult selectResult = client.Select(request).SelectResult;

if (selectResult != null)
{
    items = selectResult.Item;

    // This is the only line that needs to be added to your code
    AmazonSimpleDBUtil.DecodeItems(items);

    foreach (Item it in selectResult.Item)

Likewise for results from GetAttributesResult, the resulting list of Attributes needs to be decode prior to use:

GetAttributesResponse getAttributesResponse = simpleDBClient.GetAttributes(getAttributesRequest);
if (getAttributesResponse.IsSetGetAttributesResult())
{
    GetAttributesResult result = getAttributesResponse.GetAttributesResult;
    AmazonSimpleDBUtil.DecodeAttributes(result.Attribute);
    foreach (Amazon.SimpleDB.Model.Attribute attr in result.Attribute)
    {
    ... use the attribute
    }
Installer improvements The installer lets you choose whether project templates Visual Studio Help integration is installed or on your computer.
System resources now released correctly by service interfaces and clients

Dispose can now be called on instances of service interfaces and service clients. If you use the AWSClientFactory to get an AWS client, please remember to call Dispose() on it or to wrap the client in a using() block, as follows:


using (AmazonS3 client = AWSClientFactory.CreateAmazonS3Client(accessKey, secretKey))
{
...
}

or, if you prefer instantiating clients directly:

using (AmazonS3Client client =  new AmazonS3Client(accessKey, secretKey))
{
...
}

This usage pattern of the AWS clients ensures that all resources reserved by the client objects are released when the client is garbage collected.

Supported API Versions

This release of the AWS SDK for .NET supports the following API versions:

Service API Version
Amazon EC2

2009-11-30

Amazon S3 2006-03-01
Amazon SimpleDB 2009-04-15
Amazon RDS 2009-10-16
Amazon CloudFront 2009-12-15
Amazon SQS 2009-02-01
Amazon Elastic MapReduce 2009-03-31
Amazon CloudWatch 2009-05-15
Elastic LoadBalancing 2009-05-15
Auto Scaling 2009-05-15

Known Issues

IssueDescription
Installation Requires Administrator Privileges The default install location is %PROGRAMFILES%, which on most computers is "c:\program files". In order to install files to the default location, the MSI must be run by an Administrator. If you don't have Administrator privileges on the machine, please change the install location to something like "c:\Documents and Settings\<you>\AWS SDK for .NET", and the install will complete successfully. If you are running on Vista, your personal folder is similar to "c:\users\<you>\".

See also the related known issue on installing the SDK in a custom folder.

Uninstalling the SDK produces "Unknown Publisher" message On Windows Vista, uninstalling the MSI results in an "Unknown Publisher" dialog even though the installer is signed by Amazon Web Services. This is a known Windows Installer bug on Windows Vista, and is documented here: http://support.microsoft.com/kb/929467/en-us

Download the AWS SDK for .NET from http://aws.amazon.com/sdkfornet.

©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.