dhl:指定的命名连接在配置中找不到、非计划用于 EntityClient 提供程序或者无效。

指定的命名连接在配置中找不到、非计划用于 EntityClient 提供程序或者无效。

1. 查看该项目中有没有system.data.entity.dll

2. 查看该项目中配置文件web.config 或者 app.config 中有没有正确配置链接字符串。

    <connectionStrings>
        <add name="CMSEntities" connectionString="metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=192.168.1.200;Initial Catalog=PingCoApp;Persist Security Info=True;User ID=httpuser;Password=httpuser;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    </connectionStrings>

原文地址:https://www.cnblogs.com/dudu837/p/1553119.html