WebsiteConfiguration.xml

Get an overview of parameters of the website configuration

You can find WebsiteConfiguration.xml in a website container.

[blob_storage]/[website_container]/Configuration/WebsiteConfiguration.xml

You use this file to configure a website before publishing (down-syncing) it from the website container to a deployed web role.

Example:

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <Runtime writeback="false" websiteType="composite-c1" downSyncMode="mirror"/>
  <Bindings>
    <Binding port="80" hostname="contoso.com" />
  </Bindings>
</Configuration>
The following are parameters available for configuration in this file:

Runtime

ParameterDescriptionValue
writebackIndicates whether changes on the website must be up-synced from the web role back to the blob storage. Should be set to 'false' (disabled) for a scaled-out website in a staging site / live site setup. Disabling write-backs also disables the CMS Console for the live websites in web roles.['false' or 'true']
websiteTypeIndicates whether the website is C1 CMS based. When set to 'composite-c1', it will be treated as a C1 CMS site and some files and folders (temporary, cache) will not be down-synced from the blob storage to the web role.composite-c1
downSyncMode

Indicates whether to delete the files on the server if the files have been deleted in the blob (on the "source" website):

  • When set to 'mirror', the files deleted in the blob will be also deleted on the server.
  • When set to 'copy', the files deleted in the blob will be kept on the server.
Other changes (new or modified files) will be completely synchronized regardless of the setting.
['mirror' or 'copy']

Example:

<Runtime writeback="false" websiteType="composite-c1" downSyncMode="mirror" />

Bindings

When configuring a website, you should provide at least one binding with a <Binding/> element.

ParameterDescriptionValue
hostnameThe hostname of the website. If not specified, the default name assigned by Microsoft Azure is used instead, e.g. '[cloud-service-name].cloudapp.net'[e.g. 'contoso.com']
portThe port number to access the website at. 80 by default. For SSL support the port (even the default 443) should be set explicitly.[e.g. 80]
certificateHashThe thumbprint (hash) of the certificate used for SSL support. Should be set only for a HTTPS binding.[e.g. 'F182190033077DC6785CFE87FFCA1CD69346DAAA']
sniIndicates whether Server Name Indication option is enabled on IIS, which allows hosting mutliple SSL websites on the same server. Should be set to 'true" and only for a HTTPS binding.true

Example:

<Bindings>
	<Binding />
	<Binding hostname="contoso.com" port="80" />
	<Binding hostname="contoso.com" port="443" 
certificateHash="F182190033077DC6785CFE87FFCA1CD69346DAAA" sni="true" />
</Bindings>

Note. Using <Binding /> without any parameters set defaults to an HTTP binding with the default hostname (assigned by Microsoft Azure) and default port number (80).