Before you install and use Windows Azure Thumbnails Sample you must:
- Review the Windows Azure Thumbnails Sample license terms by clicking the Custom link above.
- Print and retain a copy of the license terms for your records.
By downloading and using the Windows Azure Thumbnails Sample, you agree to such license terms. If you do not accept them, do not use the software.
The Windows Azure Thumbnails sample is a hosted service that demonstrates a web role, a worker role, and a queue. The web role provides a front-end application for
the user to upload images and adds a work item to a queue. The worker role retrieves the work item from the queue and creates thumbnails in the specified folder.
- Storage account
– The sample is configured for using the Windows Azure Compute Emulator
and diagnostic data and images are collected in a local storage account. If you want to use this sample with a subscription in Windows Azure, you must create a storage account in Windows Azure and provide the account information
in the service configuration for the sample.
- Windows Azure SDK
provides tools and files that are needed to complete the development process of an application for Windows Azure.
Studio 2010 – the sample provides a Visual Studio 2010 project that you can use to deploy the sample.
Building and Running the Sample
To run the sample from Visual Studio 2010
- Open Visual Studio 2010 as an administrator.
- Browse to the folder where you extracted the sample and open Thumbnails.sln.
- Press F6 to build the solution.
- Press F5 to debug the solution. When you debug or run
the application from Visual Studio, Visual Studio packages the application, starts the Windows Azure Compute Emulator, deploys the application to the Compute Emulator, and launches the browser to
display the default web page defined by the web role.
page displayed by the web role instance shows images that have been previously uploaded. Click
to select an image to upload. Click
Submit to upload the file, create a blob in the appropriate container, and add a message to the queue for the worker role instance.
the diagnostic connection string
Windows Azure Managed Library provides diagnostics classes to write log data to the Windows Azure storage services, either at scheduled intervals or by requesting an on-demand transfer. By default, the Windows Azure Thumbnails sample is configured to write
log data and image data to development storage. If you choose to deploy the application to Windows Azure, you must change the configuration string in the service model to specify a storage account in
change the diagnostic connection string in Visual Studio
Solution Explorer, expand Roles, right-click
Thumbnails_WebRole , and then click
the Settings page, select Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString,
and then click the Edit (...) button.
Enter Storage Credentials, and then enter your account name and key for your Windows Azure storage account.
whether to use the default HTTP or HTTPS endpoints to connect to the storage services. Alternately, you can configure custom endpoints for each of the three storage services.
this process for the worker role.
change the diagnostic connection string by using a text editor
the ServiceConfiguration.cscfg file using a text editor, such as Notepad.
the value of the Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString setting
to use a connection string for Windows Azure storage. The connection string must be in the format shown in the example below.
the Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString setting for the worker role and change it in the same way.
the ServiceConfiguration.cscfg file.
You must choose either http or https, <account-name> must be changed to the name of your storage account, and <account-key>
must be changed to the key of your storage account.