Entity framework 在Azure';中安装时无法使EF连接字符串正常工作;s的管理门户?

Entity framework 在Azure';中安装时无法使EF连接字符串正常工作;s的管理门户?,entity-framework,azure,entity-framework-6,azure-sql-database,azure-web-app-service,Entity Framework,Azure,Entity Framework 6,Azure Sql Database,Azure Web App Service,我正在使用部署在WebApps、EF6和Azure SQL数据库上的ASP.NET MVC4 我有两个连接字符串,一个直接到DB,另一个是使用实体框架时需要的。如果我通过Azure设置了第一个,并将EF字符串保留在web.config中,则一切正常。一旦我尝试将EF connectionstring移动到Azure,它就会中断 我已经尝试跟随所有关于如何在Azure管理门户中设置EF连接字符串的帖子,建议似乎是使用以下内容: <add name="EFConnectionString" c

我正在使用部署在WebApps、EF6和Azure SQL数据库上的ASP.NET MVC4

我有两个连接字符串,一个直接到DB,另一个是使用实体框架时需要的。如果我通过Azure设置了第一个,并将EF字符串保留在web.config中,则一切正常。一旦我尝试将EF connectionstring移动到Azure,它就会中断

我已经尝试跟随所有关于如何在Azure管理门户中设置EF连接字符串的帖子,建议似乎是使用以下内容:

<add name="EFConnectionString" connectionString="" providerName="System.Data.EntityClient"/>
在管理门户中:

姓名:

价值:

metadata=res://MyModel/model.csdl|res://MyModel/model.ssdl|res://MyModel/model.msl;provider=System.Data.SqlClient;provider connection string="Data Source=tcp:myserver.database.windows.net,1234;Initial Catalog=mydatabase;User ID=Admin@myserver.database.windows.net;Password=12345678"
SQL数据库:

Custom
注:

在Web.config中,我仍然需要以下内容:

<add name="EFConnectionString" connectionString="" providerName="System.Data.EntityClient"/>
进一步的日志错误消息:

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
谢谢你的帮助。我试图这样做是为了增强访问Azure上DB的存储密码的安全性,因为我知道通过门户设置密码会对其进行加密


谢谢

首先检查您的部署。我遇到了类似的问题,经过几个小时的努力,我发现我在部署时没有实际发送连接字符串,返回到门户配置中的任何内容。。。we.config中的其他键正在发送过来,但conn字符串没有。。。在门户上正确设置后,一切都恢复正常…

这一切对我来说真的很奇怪。为什么一个配置中的连接字符串在另一个SqlClient中使用System.Data.EntityClient?为什么端口(我假设是1234)之间用“,”而不是“:”?借用第一次检查的建议,检查您是否在ConfigurationManager.ConnectionString中看到连接字符串(即,将其写入网页)。该名称应出现在web.config中,Azure WS将用门户中定义的值替换该名称(如果不存在该名称,则不会添加新名称)。
The page cannot be displayed because an internal server error has occurred.
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.