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 ...
随机推荐
- HearthBuddy DONOTDELETE.bin
namespace Hearthbuddy{ // Token: 0x02000022 RID: 34 public class App : System.Windows.Applicat ...
- Access denied for user 'root'@'localhost'问题的解决
mysql> grant all privileges on *.* to root@'localhost' identified by '密码'; mysql> flush privil ...
- GC垃圾回收 | 深入理解G1垃圾收集器和GC日志
来源:并发编程网链接:http://ifeve.com/深入理解G1垃圾收集器/ G1 GC是Jdk7的新特性之一.Jdk7+版本都可以自主配置G1作为JVM GC选项:作为JVM GC算法的一次重大 ...
- 1.springAOP原理分析
环境:jdk1.8 + spring boot 2.0.9.RELEASE Spring AOP的实现本质上就是代理Proxy + 一系列的拦截器 使用@Aspect,引入依赖 <depende ...
- ActiveMQ的作用总结(应用场景及优势)以及springboot+activeMq 实战
业务场景说明: 消息队列在大型电子商务类网站,如京东.淘宝.去哪儿等网站有着深入的应用, 队列的主要作用是消除高并发访问高峰,加快网站的响应速度. 在不使用消息队列的情况下,用户的请求数据直接写入 ...
- 【SR汇总】效果对比
算法时间效率 -见 https://www.cnblogs.com/wxl845235800/p/10826957.html 1.SRCNN <Learning a Deep Convoluti ...
- PHP拼多多模式,砍价免费拿商品算法
我12年开始做网站,对拼多多关注两三年了,一直对他们的拉新模式很感兴趣,下面我对砍价送礼品的算法跟大家分享下. 拼多多砍价免费拿商品有几个核心的东西: 1.需要拉新多人给商品,这个是直接在数据库配 ...
- pyinstaller发布exe,弹出Failed to execute script main
1.在PyCharm中按Alt+F12打开Terminal对话框 1.1我的项目文件放在wxpython目录下,D:\learn\Weather index insurance\wxpython> ...
- playbook文件内容解释
[root@node1 playbook]# cat nginx.yml - hosts: test \\主机组,要和nginx.yml在同一个目录下 remote_user: root \\远端执行 ...
- coreDNS域名无法解析问题
问题: 在pod内无法解析域名 解决: busybox的镜像有bug,导致ping可以解析,但是nslookup无法解析 kubectl run -it --rm --image=infoblox/d ...