[This is prerelease documentation and is subject to change in future releases.]
The Thumbnails sample is a service that demonstrates a web role and a worker role. The web role provides a front-end application for the user to upload photos and adds a work item to a queue. The worker role fetches the work item from the queue and creates thumbnails in the designated directory.
The Thumbnails sample demonstrates the following features of the Windows Azure SDK:
-
Building a front-end Web site using ASP.NET Web Forms
-
Defining a web role
-
Calling REST API operations against the Blob and Queue services
For detailed information on building and running the sample, see the readme file in the Thumbnails sample directory.
Publishing the Thumbnails Sample to the Windows Azure Fabric
To publish this sample to the Windows Azure fabric, you can modify the settings provided in the ServiceConfiguration.publish.cscfg file. This file is provided as a template to help you configure the sample service for Windows Azure.
The ServiceConfiguration.publish.cscfg file may be found in the \Thumbnails\Thumbnails directory (relative to the root of your samples directory). This directory also includes the ServiceDefinition.csdef and the Thumbnails.ccproj files.
The following table describes the settings available in this configuration file.
|
Setting name
|
Description
|
|---|
AccountName | Set this value to the name of your storage account. This is the storage account name that you selected on the Azure Services Developer Portal. Note that it is not the same as your Windows Live ID account. |
AccountSharedKey | Set this value to the shared key for your storage account. This value is available from the Azure Services Developer Portal. |
BlobStorageEndpoint | Set this value to the endpoint for the Blob service without account name. This value should be http://blob.core.windows.net, or https://blob.core.windows.net if this service will be accessed over an SSL connection. |
QueueStorageEndpoint | Set this value to the endpoint for the Queue service for your account. This value should appear as http://queue.core.windows.net, or https://queue.core.windows.net if this service will be accessed over an SSL connection. Note that the value for this setting should not include the storage account name. |
TableStorageEndpoint | Set this value to the endpoint for the Table service for your account. This value should appear as http://table.core.windows.net, or https://table.core.windows.net if this service will be accessed over an SSL connection. Note that the value for this setting should not include the storage account name. |
After you package the sample service, you can upload the sample service together with the Thumbnails.publish.cscfg file to the Azure Services Developer Portal. You can change the name of this configuration file if you wish.
Note that the sample directory also includes a file named ServiceConfiguration.cscfg. This file configures the sample service to run in the development fabric. If you examine this file, you'll see that the configuration settings are set to values specific to the development fabric.
When you publish the sample service, you may wish to modify the ServiceConfiguration.cscfg file to publish to mixed mode in order to test your service. In mixed mode, your service is hosted in the development fabric, but accesses resources in the Windows Azure storage services rather than the development storage services. For more information about publishing your service, see Deploying a Service.
See Also