Setting EF Connection String in Azure Web App

后端 未结 4 1641
误落风尘
误落风尘 2020-12-30 04:10

We have an ASP .NET (MVC) app and are using Entity Framework 6 to connect to our databases. The DbContext is constructed in a standard way and it loads the connection string

4条回答
  •  被撕碎了的回忆
    2020-12-30 04:31

    If you have this line in web.connfig

    
    

    Add this in azure portal:

    Name Column => Entities
    
    Value Column => metadata=res://*/TestDB.csdl|res://*/TestDB.ssdl|res://*/TestDB.msl;provider=System.Data.SqlClient;provider connection string="Data Source=XXXXXXXX.database.windows.net,1433;Initial Catalog=YourDB;User ID=YourUser;Password=XXXXXX" 
    
    "Custom" - In the drop selection box
    

    Make sure (as stated in first answer) to replace " with "

提交回复
热议问题