4
votes

Here is full details about new Azure Staging Feature. And it says

Some settings from the staged version will automatically copy to the production version – including things like connection string overrides, handler mappings, and other settings you might have configured. Other settings like the DNS endpoints, SSL bindings, etc will not change (ensuring that you don’t need to worry about SSL certs used for the staging domain overriding the production URL cert, etc).

What i don't understand is, it says connection strings are overrides. When i do swap connection strings, they swap each other. So in that case, my staging website database become production database. What i expect is, it doesn't touch connection strings at all and my production site will continue to use same database but it use staging database because connection string swap each other.

Is it possible to configure staging website for not to replace connection strings ?

It isn't wrong design by azure team that swapping cause to use test database on production website ?

1

1 Answers

3
votes

Unfortunately that is the design right now. AppSettings are just environment variables. To load different environment variables on a swap, that would require a process restart which will defeat one of the main requirements for this feature which is eliminating cold start time.

For now you can automate changing the staging database to the production one, and then hitting your site to warm it up right before you swap. But keep in mind that this feature is in preview now and some things are subject for change.