1
Vote

Suggestion: allow provider to get connectionString from Azure ServiceConfiguration

description

In a way where we check if the appication is running within Azure or not (for debugging, etc). Like:
 
// Change for getting connectionstring from the Azure configuration if running in a RoleEnvironment
        if (RoleEnvironment.IsAvailable)
        {
            s_sqlConnectionString = RoleEnvironment.GetConfigurationSettingValue("AzureSessionProviderConnectionString");
            if (String.IsNullOrEmpty(s_sqlConnectionString)) throw new Exception("No connection string specified in ServiceConfiguration.cscfg - missing setting AzureSessionProviderConnectionString (running in Azure mode)");
        }
        else
        {
            s_sqlConnectionString = config.SqlConnectionString;
            if (String.IsNullOrEmpty(s_sqlConnectionString)) throw new Exception("No connection string specified in web.config (running in non-Azure mode)");
        }

comments