Windows Azure SDKを使用すると、環境ごとに複数のサービス構成を設定できます。ただし、web.configの変更は少し難しいです。あなたの場合、サービス構成から接続文字列を読み取り、それをweb.configに書き込むコード(またはスタートアップタスク)を作成することをお勧めします。
Andyのブログ投稿「WebRoleStartupでweb.configをプログラムで変更する」では、これを行う方法を正確に説明しています。
public override bool OnStart()
{
using (var server = new ServerManager())
{
// get the site's web configuration
var siteNameFromServiceModel = "Web"; // TODO: update this site name for your site.
var siteName =
string.Format("{0}_{1}", RoleEnvironment.CurrentRoleInstance.Id, siteNameFromServiceModel);
var siteConfig = server.Sites[siteName].GetWebConfiguration();
// get the appSettings section
var appSettings = siteConfig.GetSection("appSettings").GetCollection();
AddElement(appSettings, "deploymentId", RoleEnvironment.DeploymentId);
AddElement(appSettings, "internalEndpointPort", RoleEnvironment.CurrentRoleInstance.InstanceEndpoints
.First(t=>t.Key=="InternalEndpoint1").Value
.IPEndpoint.Port.ToString());
server.CommitChanges();
}
return base.OnStart();
}