The specified named connection is either not found in the configuration,

[已解决] The specified named connection is either not found in the configuration,

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.

请问如何解决?
提问时间:2010/5/16 18:16:59 | 提问者:Souidea | 悬赏:5 | 浏览:605
最佳答案
请检查ConnectionString是否写入到了Web.config中。有些情况下,这个ConnectionString只会保存到项目的App.config中(比如你单独建立了一个项目,生成EF模型),这时需要将ConnectionString复制到Web.config。
回答时间:2010/5/16 18:21:33 | 回答者:zsu
其他参考答案(0)
提交失败!请检查错误!错误信息:

注:以上所有信息由网友提供,仅供交流、参考,均不代表盛派网络言论,如果有任何问题或不妥,请立即联系我们

以下信息或许对您有用: