Freigeben über


Windows Azure: Changing Configuration In Web.Config Without Redeploying The Whole ASP.NET Application

Programming Windows Azure - Programming the Microsoft Cloud[UPDATE April 6, 2011] Dominick Baier of www.leastprivilege.com brought to my attention several important things to have in mind when using this technique:

  • This technique is not suitable for multi instance scenarios rather for single instance scenario.
  • This technique is only for troubleshooting/dev purposes and not for production changes.
  • Those changes would get the local solution out of sync with the online solution.
  • In multi-instance scenario such changes result in time window where the instances are configured differently - but the load balancer will still round robin requests potentially resulting in different behavior among the instances.
  • The web.config changes will get lost as soon as the fabric controller heals or moves your VM.

To change web.config setting directly in the Windows Azure role you need to configure your Windows Azure role for Remote Desktop administration. Detailed walkthrough is here: Using Remote Desktop with Windows Azure Roles.

Initially the application needs to be deployed entirely to Windows Azure with the required setting applied in order to enable direct configuration of web.config without re-deploying the application. Web.config located under E:\Approot\_WASR\0.

Summary of steps in the walkthrough:

  • Step 1 – Configure Remote Desktop Connections Using Visual Studio
  • Step 2 – Upload Certificate For Remote Access Connection To Windows Azure
  • Step 3 – Publish Your Application To Windows Azure
  • Step 4 – Connect To Windows Azure Role Using RDP

Download Windows Azure SDK