zoukankan      html  css  js  c++  java
  • 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

    要么是没有发现在配置中,指定的命名连接,不打算要用于EntityClient提供程序,或不是有效的

    解决办法:

    I suspect that your issue is coming from the fact that you have more than one project in your solution and the one that contains your entity framework stuff including edmx files is NOT the solutions's startup project. In this case even if the connection string exists in the EF app.config project, still CLR cannot find it at runtime. For example if you have a web site and a EF project in your solution, you need to copy the connection string from the EF project's app.config to your website's web.config. Basically any connection string data should be exist in the config file of the project that the .Net threads initiated from by CLR (i.e. your startup project). If this is not your case, then just open your edmx file, right click on its surface, select properties and copy the connection string and paste it into your app.config Connection String section. This way you can make sure that you are having the correct one in your config. 
    作者:dupeng0811
    版权:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接
    留言:同时 , 如果文中有什么错误,欢迎指出。以免更多的人被误导。
  • 相关阅读:
    什么是马甲APP?怎么用马甲APP导流
    OC与JS交互前言-b
    UIWebView1-b
    Mac双系统切换
    iOS之手势滑动返回功能
    Duplicate Symbol链接错的原因总结和解决方法-b
    #ifndef#define#endif的用法-b
    iOS Copy 和 MutableCopy的区别 深浅拷贝的区别-供参考
    解决CocoaPods在OS X 10.11出现问题-b
    django中cookies和session
  • 原文地址:https://www.cnblogs.com/dupeng0811/p/2671162.html
Copyright © 2011-2022 走看看