How do I set an ADO.NET Entity Framework connection string via the Windows Azure (Preview) Management Portal?

The solution for my problem was selecting "Custom" instead of "SQL Azure" from the "SQL Azure / SQL Server / MySQL / Custom" selector for the Entity Framework connection string, even though the database does run on SQL Azure.

[Edit] From a popular comment by @matthew-steeples below:

I would add to this for anyone else having the same issue is that sometimes the config file will have " instead of ", and the Azure Websites needs those to be changed to "


enter image description here

Replace

"

with

"

In the connection string.


Not only did I have to use double quotes (or single quotes) instead of " (and select Custom for the type) but I also had to make sure there was a dummy value in my transform config. I was replacing the entire connectionStrings node, but decided to keep that and add this:

<add xdt:Transform="Replace" xdt:Locator="Match(name)" name="FooBarEntities" connectionString="temp" providerName="System.Data.EntityClient" />

Without this, I was getting the following error:

The connection string 'FooBarEntities' in the application's configuration file does not contain the required providerName attribute.