且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

运行Web应用程序时出现连接错误

更新时间:2021-11-29 03:08:50

您需要将app.config中的连接字符串复制到web.config,或将整个文件复制到显示输出.这是使用框架的条件之一.
You need to copy the connection string in the app.config to your web.config, or copy the entire file to the project which displays the output. It is one of the conditions to consume the framework.


解决方案:将连接字符串从新创建的类库项目移至网站项目.

报告了类似的问题,并在此处解决:http://blog.weareon.net/指定连接名不打算与实体客户端提供者一起使用的配置或无效// [ ^ ]
Solution: Moving the connection string from newly created class library project to the website project.

Similar issue reported with resolution here: http://blog.weareon.net/the-specified-named-connection-is-either-not-found-in-the-configuration-not-intended-to-be-used-with-the-entityclient-provider-or-not-valid/[^]