I am using Entity Framework Code First 4.3 + Azure and am having difficulty connecting to the database. The error I get is the following (on first request):
Keyword not supported: 'server'.
I have the following connection configured in my web.config
<configSections> type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections> <connectionStrings> <add name="TestDBContext" connectionString="Server=tcp:[SUBSCR].database.windows.net,1433;Database=[MyDB];User ID=[user];Password=[pass];Trusted_Connection=False;Encrypt=True;PersistSecurityInfo=True" providerName="System.Data.EntityClient" /> </connectionStrings>
In my DbContext implementation class, the connection string name is used:
public class MyContext : DbContext, IMyContext { public MyContext() : base("TestDBContext") { Configuration.LazyLoadingEnabled = true; Configuration.ProxyCreationEnabled = true; }
Can you tell what is going on?
source share