Keyword not supported: 'data source'. - Azure azure c# entity-framework entity-framework-6


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'.

Conn String

<add name="SoccerEntities" 
                       provider connection string='server=tcp:<servername>,1433;
                                                   initial catalog=MyDB;
                                                   persist security info=True;
                                                   user id=user;
                        providerName="System.Data.EntityClient" />    
12/19/2016 3:24:19 PM

Accepted Answer

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

12/19/2016 8:32:01 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow