This project is read-only.

Cannot deploy 2 Orchard Applications to Azure with one storage account


Scenario: An orchard application needs to be deployed to DEV and QA environments. When attempting this using a shared storage account, both applications use the same settings.txt file. This is due to the following hard coding in the Orchard.Azure project, leading to all Orchard sites using a single storage account using the same container name
namespace Orchard.Azure.Environment.Configuration {

    public class AzureShellSettingsManager : IShellSettingsManager {
        public const string ContainerName = "sites"; // container names must be lower cased
        public const string SettingsFilename = "Settings.txt";
        public const char Separator = ':';
        public const string EmptyValue = "null";
Workaround: use separate storage accounts for each. This is not a good workaround as storage accounts are limited per subscription in azure, and general maintenance would become difficult with the addition of more apps (or a DEMO and LIVE environment, for example).

Recommended Solution: The container name should be based on the cloud service name of the deployed application, or based on some configurable property in the .cscfg file (which can be changed per target environment). For example:
      <Setting name="OrchardSettingsContainer" value="Dev.Orchard.Sites" />