We've recently converted our ServiceStack application to an Azure Cloud Service.
We're finding that, internally, ServiceStack is not aware that it needs to load configuration settings (like oauth.RedirectUrl) using CloudServiceConfiguration manager instead of ConfigurationManager.
Is there a way to wire up ServiceStack appropriate for the new environment?
Thanks!
There's no AppSettings provider for Azure CloudServiceConfiguration, it should be fairly easy to create one by inheriting AppSettingsBase
and overriding GetNullableString()
otherwise the easiest way is to populate a Dictionary<string,string>
with the configuration from Azure and load them into DictionarySettings
, e.g:
AppSettings = new DictionarySettings(azureSettings);
If you want to both Web.config <appSettings/>
and Azure Settings together you should use a cascading source of AppSettings in your AppHost constructor using MultiAppSettings
, e.g:
AppSettings = new MultiAppSettings(
new DictionarySettings(azureSettings),
new AppSettings());