The connection strings in the Portal allow you to override the connection strings defined in the web.config.
When you're developing locally, you probably use a database located in localhostSQLExpress or something similar. If you deploy without having set up web.config transformation it would mean that your Web Site running in Windows Azure would still point to localhostSQLExpress, which isn't something you would want.
The connection strings in the Portal allow you to override existing connection strings which are already defined in the web.config. If your web.config does not contain a connection string with the same name as the one configured in the portal, it will not be added and be accessible at runtime. This might be the issue you're experiencing.
To fix this, simply add a connection string to your web.config file with the same name as the one you have already added to the portal.
Update: Like I already explained in a comment, Windows Azure Web Sites does not physically modify the web.config (source), it does this at runtime. So in order to check which AppSettings and ConnectionStrings are actually available at runtime, try this:
Controller:
public ActionResult Index()
{
ViewBag.ConnectionStrings =
ConfigurationManager.ConnectionStrings.Cast<ConnectionStringSettings>();
ViewBag.AppSettings = ConfigurationManager.AppSettings;
return View();
}
View:
<h3>ConnectionStrings:</h3>
<ul>
@foreach (var setting in ViewBag.ConnectionStrings)
{
<li>@setting.Name: @setting.ConnectionString</li>
}
</ul>
<h3>AppSettings:</h3>
<ul>
@foreach (var s in ViewBag.AppSettings)
{
<li>@setting: @System.Configuration.ConfigurationManager.AppSettings[s]</li>
}
</ul>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…