Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Staging and Production Configurations with Windows Azure Web Sites

I have an ASP.NET MVC 4 web site. I'm new to Windows Azure, so I thought I would try out doing a whole publish cycle. I'd like to do a build a publish to a staging area when a check-in happens. Then, if I like the change, I'd like to push them to production.

Is this possible with Windows Azure web sites? If so, how? Currently, I have a Windows Azure Web Site. I can successfully publish the site to Windows Azure. However, I can't seem to figure out how to do staging / production configurations.

Thank you for your help.

like image 244
YUI Developer Avatar asked Nov 25 '12 13:11

YUI Developer


2 Answers

Brady Gaster blogged about this a few days ago, giving you 2 options:

  • Using different branches (with a staging branch, this is good if you're using GitHub for example)
  • Using web.config transformations (with a staging publishing profile)
like image 115
Sandrino Di Mattia Avatar answered Nov 03 '22 12:11

Sandrino Di Mattia


In newer Resource Model, Azure provide deployment slots ( App Service | Deployment | Deployment Slots ) which could be used with publishing profile and sticky configuration settings ( App Service | Settings | Application settings | App Settings | put your configuration here and select Slot Setting check box to make it exclusive to the environment like staging and production.

Check the official Microsoft link for more info

Note: This question is very old and suggested solution is on Cloud services, the solution to this problem is provided by Azure's newer model Resource Manager and App service, which gives you Deployment slots which could be swapped any time by the admin and gives you the ability to make slot based sticky configuration (as asked in the question, i.e. a way to make the environment based settings).

like image 24
Muhammad Zaheer Nazir Avatar answered Nov 03 '22 12:11

Muhammad Zaheer Nazir