I am using Entity Framework in a MVC web application. My database is in azure and I am deploying my web app to azure. But when I deploy the application I receive the error below. I do NOT receive this error while debugging even though I am connecting to the same database.
Keyword not supported: 'data source'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Keyword not supported: 'data source'.
<add name="SoccerEntities" connectionString="metadata=res://*/Models.MyModel.csdl |res://*/Models.MyModel.ssdl |res://*/Models.MyModel.msl; provider=System.Data.SqlClient; provider connection string='server=tcp:<servername>,1433; initial catalog=MyDB; persist security info=True; user id=user; password=pwd; MultipleActiveResultSets=True; App=EntityFramework'" providerName="System.Data.EntityClient" />
Found the answer. Apparently there are some default connections strings set in the Azure IIS Web App out-of-the-box. I'm not sure why my Web.config wasn't overriding these settings but it wasn't. I had to set a default conn string in the admin panel.
In Azure Admin Panel:
Select App -> Application Settings -> Enter new Connection String -> Save