The specified named connection is either not found in the configuration,
[已解决] The specified named connection is either not found in the configuration,
当前页面:http://www.senparc.com/SZD-109
{ 收藏当前页面 }
5
[软件及编程 > C# > LINQ > LINQ to Entities]
使用Linq to Entities开发网站,当使用MyEntities ent =MyEntities()实例化的时候,出现如下错误:
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
请问如何解决?
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
请问如何解决?
最佳答案
请检查ConnectionString是否写入到了Web.config中。有些情况下,这个ConnectionString只会保存到项目的App.config中(比如你单独建立了一个项目,生成EF模型),这时需要将ConnectionString复制到Web.config。
回答时间:2010/5/16 18:21:33
| 回答者:zsu
其他参考答案(0)
提交失败!请检查错误!错误信息:
以下信息或许对您有用:
- [已解决] 100 Unable to update the EntitySet 'Users' b... 2011/1/14 21:47:44
- [已解决] 40 无法创建类型为“结束类型”的常量值。此上下文仅支持基元类型(“例如 Int32、... 2010/9/19 22:28:05
- [已解决] 5 Linq to Entities是否支持SQLite数据库? 2010/9/9 23:00:55
- [已解决] 5 System.NotSupportedException: 2010/5/30 11:48:41
- [已解决] 0 The ConnectionString property has not be... 2010/5/16 23:04:39