我的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 ...
随机推荐
- python代码优化---就喜欢细节
地址:http://www.codeproject.com/Tips/829060/Python-Code-Optimizations-Part-One 转发过来保存一下.喜欢精雕细琢,编程才有乐趣. ...
- idea 从github下载项目提示 file name too long 的解决方案
1.找到git shell命令行 2运行如下命令 git config --global core.longpaths true 附地址https://github.com/Strider-CD/st ...
- JAVA获取服务器路径的方法
1.在JSF环境中获取到ServletContext: 1 2 ServletContext sc = (ServletContext)FacesContext. getCurrent ...
- SpringMVC常用注解實例詳解2:@ModelAttribute
我的開發環境框架: springmvc+spring+freemarker開發工具: springsource-tool-suite-2.9.0JDK版本: 1.6.0_29tomcat ...
- bootstrap框架 导航条组件使用
本文记载boot 导航条组件使用方法 导航条组件 导航条是在您的应用或网站中作为导航页头的响应式基础组件.它们在移动设备上可以折叠(并且可开可关),且在视口(viewport)宽度增加时逐渐变为水平展 ...
- Mysql --分区表的管理与维护
改变一个表的分区方案只需使用alter table 加 partition_options 子句就可以了.和创建分区表时的create table语句很像 创建表 CREATE TABLE trb3 ...
- lockfree
为什么要lockfree 按我的理解, lockfree就是不去 调用操作系统给定的锁机制. 1. 会有system call, and system call is expensive; 比如pt ...
- 每天记一些php函数,jQuery函数和linux命令(二)
简介:学习完了php和jQuery之后,对函数的记忆不到位,导致很多函数没记住,所以为了促进自己的记忆,每天花一点时间来写这个博客. 时间:2016-12-19 地点:太原 天气:晴 一.p ...
- 远程连接oracle服务器
用户名 / 密码@172.16.16.203:1521/orcl
- WordPress访问打开速度很慢的几种解决方法
最近WordPress网站访问特别的慢,有时间要加载一分钟才能完全打开,最初怀疑是服务器的问题,经过多方测试,还是没找到原因.后来,通过工具测出浏览器一直在加载fonts.googleapis.com ...