我的ef连接mysql之旅
摘要: install-package ef6,mysql.data;增加provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d";修改edmx Schema的Provider="MySql.Data.MySqlClient"
HResult=-2146233036
Message=“BLL.BasicBll.ChemapaoBll”的类型初始值设定项引发异常。
Source=BLL
TypeName=BLL.BasicBll.ChemapaoBll
StackTrace:
在 BLL.BasicBll.ChemapaoBll.GetEmployees(Int64 entId)
在 TravelWebApi.Controllers.QueryController.EntDetail(Int64 entId) 位置 d:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\Controllers\QueryController.cs:行号 36
在 lambda_method(Closure , ControllerBase , Object[] )
在 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
在 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
在 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
在 System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
在 System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
在 System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
InnerException: System.TypeInitializationException
HResult=-2146233036
Message=“System.Data.Entity.Internal.AppConfig”的类型初始值设定项引发异常。
Source=EntityFramework
TypeName=System.Data.Entity.Internal.AppConfig
StackTrace:
在 System.Data.Entity.Internal.AppConfig.get_DefaultInstance()
在 System.Data.Entity.Internal.LazyInternalConnection..ctor(DbContext context, String nameOrConnectionString)
在 System.Data.Entity.DbContext..ctor(String nameOrConnectionString)
在 EF.ChemapaoEntities..ctor() 位置 d:\SourceProject\chuxing_ver1\trunk\TravelWebApi\DataAccess\EF\Chemapao.Context.cs:行号 18
在 BLL.BasicBll.ChemapaoBll..cctor() 位置 d:\SourceProject\chuxing_ver1\trunk\TravelWebApi\Business\BLL\BasicBll\ChemapaoBll.cs:行号 15
InnerException: System.Configuration.ConfigurationErrorsException
HResult=-2146232062
Message=创建 entityFramework 的配置节处理程序时出错: 未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040) (D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\web.config line 9)
Source=System.Configuration
BareMessage=创建 entityFramework 的配置节处理程序时出错: 未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
Filename=D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\web.config
Line=9
StackTrace:
在 System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
在 System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
在 System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
在 System.Web.HttpContext.GetSection(String sectionName)
在 System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
在 System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
在 System.Configuration.ConfigurationManager.GetSection(String sectionName)
在 System.Data.Entity.Internal.AppConfig..ctor()
在 System.Data.Entity.Internal.AppConfig..cctor()
InnerException: System.IO.FileLoadException
HResult=-2146234304
Message=未能加载文件或程序集“EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
Source=System.Configuration
FileName=EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
FusionLog==== 预绑定状态信息 ===
日志: DisplayName = EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
日志: Appbase = file:///D:/SourceProject/chuxing_ver1/trunk/TravelWebApi/TravelWebApi/
日志: 初始 PrivatePath = D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\bin
调用程序集: System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: D:\SourceProject\chuxing_ver1\trunk\TravelWebApi\TravelWebApi\web.config
日志: 使用主机配置文件: C:\Users\Administrator\Documents\IISExpress\config\aspnet.config
日志: 使用 C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config 的计算机配置文件。
日志: 在应用程序配置文件中找到重定向: 4.4.0.0 已重定向到 5.0.0.0。
日志: 策略后引用: EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
日志: 尝试下载新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/8f0d007c/83612a6c/EntityFramework.DLL。
日志: 尝试下载新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/8f0d007c/83612a6c/EntityFramework/EntityFramework.DLL。
日志: 尝试下载新的 URL file:///D:/SourceProject/chuxing_ver1/trunk/TravelWebApi/TravelWebApi/bin/EntityFramework.DLL。
警告: 比较程序集名称时发生不匹配: 主版本
错误: 未能完成程序集的安装(hr = 0x80131040)。探测终止。
StackTrace:
在 System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
在 System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
在 System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
在 System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
在 System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
其他信息: 指定的架构无效。错误:
我的ef连接mysql之旅的更多相关文章
- EF 连接MySQL 数据库 保存中文数据后乱码问题
EF 连接MySQL 数据库 保存中文数据后乱码问题 采用Code First 生成的数据库,MySQL数据库中,生成的表的编码格式为***** 发现这个问题后,全部手动改成UTF8(图是另一个表的 ...
- EF连接mysql数据库生成实体模型
声明:本人也是第一次用EF连接mysql生成实体模型 经过试验: mysql-connector-net-6.6.6 可以支持VS2012 mysql-connector-net-6.3.9 可以支持 ...
- EF连接MySQL数据Web.Config配置
EF连接MySQL数据Web.Config配置 <?xml version="1.0" encoding="utf-8"?> <configu ...
- 如何用VS EF连接 Mysql,以及执行SQL语句 和存储过程?
VS2013, MySQL5.7.18 , MySQL5.7.14 执行SQL语句: ztp_user z = new ztp_user(); object[] obj = new object[] ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(91)-EF 连接 MySql
前言 虽然系统目前只支持MSSQL版本,但是很多朋友公司技术规定必须使用MySql,下面我们就来使用EF连接MySQL吧! (1)安装MYSQL环境 1.下载安装MYSQL数据,这里我们安装phpSt ...
- EF连接MySql数据库
Windows要想EF连接MySql,首先要安装两个应用程序 mysql-connector-net-6.8.8.msimysql-for-visualstudio-1.2.7.msi 项目还需要两个 ...
- .NET5控制台程序使用EF连接MYSQL
.NET5控制台程序使用EF连接MYSQL 1.使用nuget下载: Microsoft.Extensions.Configuration.Json Pomelo.EntityFrameworkCor ...
- EF 连接MySql
使用EntityFramework6连接MySql数据库(db first方式) http://www.cnblogs.com/24la/archive/2014/04/03/ef6-mysql.ht ...
- EF连接mysql,出现A call to SSPI failed错误,解决办法
我的使用场景是用EF连接AWS的mysql RDS,会偶发性的出现A call to SSPI failed错误, System.AggregateException: One or more err ...
随机推荐
- javascript总结
javascript:它是一种script脚本语言 脚本语言:就是可以和HTML混合在一起使用的语言,可以用来在IE的客 户端进行程序编制,从 ...
- 安装Openfile环境和组件XMPP
打开ProFTPD和Apache Web Server 安装Openfile 在系统偏好设置中打开Openfile,开启Openfile状态 在safair浏览器中输入127.0.0.1:9090 配 ...
- 构建angular项目
1. 安装yo与gulp bower $ npm install -g yo $ npm install -g gulp bower 2. 快速创建 $ npm install -g gene ...
- doxygen的使用(二)给代码添加javadoc风格的注释
原创文章,欢迎阅读,禁止转载.本文记一下javadoc风格注释的写法,这些特殊格式的注释称作标签.按照这种规范写的注释才能生成到文档中. 块注释的写法 /** * @brief 这个块注释 * dox ...
- 使用Notepad++作为IDE代替Source Insight
视图-->Folder as Workspace 视图-->函数列表 设置-->语言格式设置-->选择主题 插件-->Plugin Manager-->装上NppG ...
- Python生成器的经典程序
import random def get_data(): """返回0到9之间的3个随机数""" return random.sample ...
- 【NHibernate】列“ReservedWord”不属于表 ReservedWords
NHibernate+FluentNHibernate+MySql 运行时黄页显示下边的异常,项目中找了半天没出现过这个列的关键字. [ArgumentException: 列“ReservedWor ...
- VS2013安装部署项目
打开vs2013/2015菜单扩展和更新,查找Installer,找到Microsoft Visual Studio 2015 Installer Projects并下载安装. 安装之后模板中即有“安 ...
- if else 的令人防不胜防的奇葩错误
if(a==t && b+c >a) else flag=false; 这个语句乍一看没什么问题,如果a==t 成立b+c >a不成立-〉flag=false; 但是编译 ...
- RHEL6p5下ntfs分区的挂载及自动挂载
No.1: #uname -a //查看你的Linux内核版本的命令 No.2:去http://www.atrpms.net/dist/el5/fuse/下载与内核接近的三个东西 fuse-libs- ...