本地运行都正常,就是发布到服务器上不行,查找了一些文章,都没解决我的问题,后来发现是路径不对和文件缺失。

原来的配置文件中是这样的:

<add name="TRidentityEntities" connectionString="metadata=res://*/TRidentityModel.csdl|res://*/TRidentityModel.ssdl|res://*/TRidentityModel.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;user id=root;password=xxxxxx;persistsecurityinfo=True;database=xxxxxx;Character Set=utf8&quot;" 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=&quot;server=localhost;user id=root;password=xxxxxx;database=xxxxxx;Character Set=utf8&quot;" providerName="System.Data.EntityClient" />

.csdl/.ssdl/.msl这三个文件你编译的时候会在你项目的bin目录中,copy过来就行了。

Unable to load the specified metadata resource的更多相关文章

  1. EF + mysql 异常:Unable to load the specified metadata resource

    数据库连接字符串报错, <add name="xxxx" providerName="MySql.Data.MySqlClient" connection ...

  2. 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 ...

  3. 【转】Unable to load embedded resource from assembly 无法加载的程序集嵌入的资源

    转自:http://blog.sina.com.cn/s/blog_994678b90101f035.html 项目运用IbatisNet 今天更新项目,编译完点击运行,报错如下: [“/”应用程序中 ...

  4. 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_ ...

  5. 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 ...

  6. 版本问题 Java:Unsupported major.minor version 51.0 (unable to load class . . .

    导入别人的项目时报错  Java:Unsupported major.minor version 51.0 (unable to load class . . . 后发现错误是由于class编译器的J ...

  7. (办公)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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. php上传文件夹 ​

    用过浏览器的开发人员都对大文件上传与下载比较困扰,之前遇到了一个php文件夹上传下载的问题,无奈之下自己开发了一套文件上传控件,在这里分享一下.希望能对你有所帮助. 以下是实例的部分脚本文件与代码: ...

  2. Python3的编译安装

    Linux环境自带了Python 2.x版本,但是如果要更新到3.x的版本,可以在Python的官方网站下载Python的源代码并通过源代码构建安装的方式进行安装,具体的步骤如下所示. 1. 安装依赖 ...

  3. 【经验】Delphi INI文件保存与读取

    //需要引用IniFiles uses system.IniFiles; //保存INI配置文件 procedure TForm1.btnSaveClick(Sender: TObject); var ...

  4. jackson对Exception类型对象的序列化与反序列化

    发现问题 今天在调试系统错误通知的时候遇到了一个问题.我们在系统异常时候要通过队列系统发送各种通知到团队内部成员. 因此我写了一个通用接口.接口中有传递Exception对象到队列中,再由队列消费者解 ...

  5. JavaScript中函数文档注释

    /** 方法说明 * @method 方法名 * @for 所属类名 * @param{参数类型}参数名 参数说明 * @return {返回值类型} 返回值说明 */

  6. 修改Mysql 数据库的密码

    1.修改my.cnf 在这个文件里面加入 skip-grant-tables 修改之后,保存.然后重启数据库 2.由于我的系统是Centos7 ,数据库是mariadb ,所以执行命令如下: 3.重启 ...

  7. java导出execl报表

    1. 下载jar包: 官方下载:http://poi.apache.org/download.html这里可以下载到它的最新版本和文档,目前最新版本是3.7,这里使用比较稳定的3.6版. 百度网盘下载 ...

  8. Cowpatty 破解WPA-PSK加密

    一:使用wireshark 嗅探类工具打开之前抓的cpp中包含WPA握手的cap 文件,使用语法  eapol 进行过滤,可以看到抓取的Key数据 将其另存为保存到一个目录下. 二:而后就使用Cowp ...

  9. 【并行计算-CUDA开发】GPU---并行计算利器

    1 GPU是什么 如图1所示,这台PC机与普通PC机不同的是这里插了7张显卡,左下角是显卡,在中间的就是GPU芯片.显卡的处理器称为图形处理器(GPU),它是显卡的"心脏",与CP ...

  10. Linux配置文件的修改

    在很多时候,我们需要对Linux的配置文件进行修改.此时就涉及到了不同Linux发行版的修改配置问题.下面就以主流的几个操作系统(Unix:Solaris,Linux:Ubuntu,Redhat)作为 ...