PersonalWebSite Sample
[This is prerelease documentation and is subject to change in future releases.]

The PersonalWebSite sample demonstrates how to port an ASP.NET Web application to Windows Azure. The sample is based on the ASP.NET Personal Web Site Starter Kit.

The PersonalWebSite sample demonstrates the following features of the Windows Azure SDK:

  • Building a front-end Web site by using ASP.NET Web Forms

  • Defining a Web role

  • Calling REST API operations against the Blob and Table services

  • Building a portable ASP.NET application that may be run in the fabric or in a standard ASP.NET Web hosting environment.

  • Using the ASP.NET Membership and Role sample providers that ship with the Windows Azure SDK

For detailed information on building and running the sample, see the readme file in the PersonalWebSite sample directory.

Publishing the PersonalWebSite 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 \PersonalWebSite\PersonalWebSite directory (relative to the root of your samples directory). This directory also includes the ServiceDefinition.csdef and the PersonalWebSite.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. 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.

allowInsecureRemoteEndpoints

This setting is used by the sample ASP.NET providers. The default value for this setting is false, or no setting. By default, the ASP.NET providers will not connect to remote HTTP endpoints for the storage services. This protection is in place because providers may transmit potentially sensitive information over the channel. Set this value to true to enable the providers to connect to remote HTTP endpoints for the storage services.

After you package the sample service, you can upload the sample service together with the PersonalWebSite.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 on publishing your service, see Deploying a Service.

See Also

Page view tracker