I got a call from a client today , their site was not working anymore. I am using azure cloud services with azure sql server. The error screen was related to a problem with connecting to azure sql server. This was very strange to me because I did not modify the cloud app in about 2-3 weeks and the site was working flawlessly until today. To investigate, I connected to the cloud service with remote desktop to look at the connection string and make sure the web.config was correct. In my suprise, the web.config contained the wrong connection string and other erronous settings. However, the connection string was somewhat familiar to me, it was an old connection string I was using when doing development on azure.
Here is what I think happened :
1) I created a cloud service with the name "Deployment1" and a database server with 2 databases.
2) I deleted the cloud service and database server after development and testing was finished because we didn't need it for a month before the site went live and didn't want to be billed for it.
3) I re-created a cloud service with the same name "Deployment1" to publish the application again. I also re-created the databases but the name was different this time (azure randomly selects database server names i think)
4) Site published and worked fine for 2-3 weeks.
5)Azure somehow replaced my new web.config with the old one I used during development.
This problem is easily fixed by re-deploying the application but is totally not acceptable for me. How come azure replaces my web.config values randomly with older ones?