Unable to load the specified metadata resource
本地运行都正常,就是发布到服务器上不行,查找了一些文章,都没解决我的问题,后来发现是路径不对和文件缺失。
原来的配置文件中是这样的:
<add name="TRidentityEntities" connectionString="metadata=res://*/TRidentityModel.csdl|res://*/TRidentityModel.ssdl|res://*/TRidentityModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=xxxxxx;persistsecurityinfo=True;database=xxxxxx;Character Set=utf8"" providerName="System.Data.EntityClient" />
修改一下:
<add name="TRidentityEntities" connectionString="metadata=~/bin/TRidentityDB\TRidentityModel.csdl|~/bin/TRidentityDB\TRidentityModel.ssdl|~/bin/TRidentityDB\TRidentityModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=xxxxxx;database=xxxxxx;Character Set=utf8"" providerName="System.Data.EntityClient" />
.csdl/.ssdl/.msl这三个文件你编译的时候会在你项目的bin目录中,copy过来就行了。
Unable to load the specified metadata resource的更多相关文章
- EF + mysql 异常:Unable to load the specified metadata resource
数据库连接字符串报错, <add name="xxxx" providerName="MySql.Data.MySqlClient" connection ...
- jenkins 启动slave,出现com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://127.0.0.1:8080/jnlpJars/remoting.jar
master: linux slave: win7 64位系统 在配置好系统后,采用jnlp的方式启动slave节点,报错如下: com.sun.deploy.net.FailedDownloadEx ...
- 【转】Unable to load embedded resource from assembly 无法加载的程序集嵌入的资源
转自:http://blog.sina.com.cn/s/blog_994678b90101f035.html 项目运用IbatisNet 今天更新项目,编译完点击运行,报错如下: [“/”应用程序中 ...
- LM-Sensors unable to load driver module
Fix - sort of - for LM-Sensors unable to load driver module In short: In /etc/default/grub set GRUB_ ...
- Unable to load configuration. - bean - jar: ....struts2-core-2.1.8.1.jar!/struts-default.xml:47:178
摘录的异常代码: 2013-12-14 22:42:07 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error严重: Dis ...
- 版本问题 Java:Unsupported major.minor version 51.0 (unable to load class . . .
导入别人的项目时报错 Java:Unsupported major.minor version 51.0 (unable to load class . . . 后发现错误是由于class编译器的J ...
- (办公)plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal
今天上午开发环境遇到这个问题,解决方案如下,(解决了之后,项目并没有丢失.) 因为Eclipse的这个plug-in org.eclipse.jdt.ui was unable to load cla ...
- Unable to load tag handler class "com.showId.Id.ShowId" for tag "ShowId:ShowId"] with root cause错误的解决方案
严重: Servlet.service() for servlet [jsp] in context with path [/Biaoqian] threw exception [/1.jsp (l ...
- Caused by: Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at com.opensymphony.xwork2.config.ConfigurationManager.getConfigurati
Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/class ...
随机推荐
- C++ UFT-8和GB2312间的转换
在这个帖子找到的代码 还蛮好用的 https://bbs.csdn.net/topics/391040755 #include <codecvt> #include <locale& ...
- Undo Segment/Undo Retention
undo_retention简单定义,就是最多数据的最少保留时间.AUM模式下,undo_retention参数用于事务commit后undo数据保留的时间.单位为秒.这是个no guarantee的 ...
- AVQueuePlayer
想要视频一个接一个的无缝连续播放么? 还在用mpmovieplayercontroller么?out了! 介绍一个可以实现无缝连续播放视频的东西-------AVQueuePlayer ! AVQue ...
- 理解MyCat分库分表
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.
- OpenCV、OpenCL、OpenGL、OpenMP的区别
OpenCV OpenCV的全称是:Open Source Computer Vision Library.OpenCV是一个开源发行的跨平台计算机视觉库,可以运行在Linux.Wind ...
- ansible简单入门
1,结构框架 Ansible 使用的是无代理体系结构,这种体系结构可以通过防止节点轮询控制机器来减少网络开销.Ansible 提供的结果框架如下所示: Ansible :运行在中央计算机上: Conn ...
- panic 捕获及 throw 崩溃
一,go 语言 panic 报错捕获 使用 go 语言的同学在真实项目中应该经常出现空指针使用等 panic 报错,这类报错与 C++ 中的 try-catch 模块不同,go 语言会一直将当前 p ...
- CORS,jsonp解决跨域问题
同源和跨域 同源策略(Same origin policy)是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少了同源策略,则浏览器的正常功能可能都会受到影响.可以说Web是构建在同源策略基础之上 ...
- postman生成格式化时间
方法一: var moment = require('moment'); var data = moment().format(" YYYYMMDDHHmmss"); consol ...
- kubenetes 的svc从ClusterPort 改为NodePort
1.yaml文件如下 spec: clusterIP: 10.233.43.125 ports: - name: http-metrics port: protocol: TCP targetPort ...