We will use Windows Azure Websites for our basic hosting needs in the future. And since there are very specific configuration settings for cloud vs local how do you manage these settings? Take for example the following:
Local Development Server:
string path = AppSettings["StoragePath"];
<add key="StoragePath" value="c:\temp" />
Windows Azure:
string path = AppSettings["StoragePath"];
<add key="StoragePath" value="xyz" />
Do you manually change the StoragePath in the config file before each release OR is there something in code that can be done such as:
<add key="LocalStoragePath" value="c:\temp" />
<add key="BlobStoragePath" value="xyz" />
string path;
if (Azure)
{
path = AppSettings["BlobStoragePath"];
}
else
{
path = AppSettings["LocalStoragePath"];
}
If the later is possible, how can i determine if the environment is Windows Azure?