The requested operation cannot be completed because the connection has been broken
具体报错
The requested operation cannot be completed because the connection has been broken. -- xxxForyyy->Index at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlDelegatedTransaction.Initialize()
at System.Transactions.TransactionStatePSPEOperation.PSPEInitialize(InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType)
at System.Transactions.TransactionStateActive.EnlistPromotableSinglePhase(InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction, Guid promoterType)
at System.Transactions.Transaction.EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType)
at System.Transactions.Transaction.EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<EnlistTransaction>b__30(DbConnection t, EnlistTransactionInterceptionContext c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.EnlistTransaction(DbConnection connection, EnlistTransactionInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.EntityConnection.EnlistTransaction(Transaction transaction)
错误:正在创建模型,此时不可使用上下文。如果在 OnModelCreating 方法内使用上下文或如果多个线程同时访问同一上下文实例,可能引发此异常。请注意不保证 DbContext 的实例成员和相关类是线程安全的。
-------------------------
原因可能是并发多线程调用DbContext问题,可以将报错点(Action,AttributeFilter)中的 DbContext 调用换成原生的SqlConnection 试下。
The requested operation cannot be completed because the connection has been broken的更多相关文章
- The requested operation has failed apache
在安装apache后, 启动apache时提示The requested operation has failed错误: 通过一排除 cd apache 安装的Bin目录cmd如下秘密(双引号中的内容 ...
- Apache启动是出现the requested operation has failed
出现的原因: 原因一:80端口占用例如IIS,另外就是迅雷. 原因二:软件冲突装了某些软件会使apache无法启动如Dr.com 你打开网络连接->TcpIp属性->高级->WINS ...
- apache启动报错:the requested operation has failed解决办法
原因一:80端口占用 例如IIS,另外就是迅雷.我的apache服务器就是被迅雷害得无法启用! 原因二:软件冲突 装了某些软件会使apache无法启动如Dr.com 你打开网络连接->TcpIp ...
- Apache无法启动解决 the requested operation has failed
Apache不能启动解决办法 原因一:80端口占用例如IIS,另外就是迅雷. 原因二:软件冲突装了某些软件会使apache无法启动如Dr.com 你打开网络连接->TcpIp属性->高级- ...
- Apache无法启动提示the requested operation has failed
主要参考这篇 http://apps.hi.baidu.com/share/detail/15868128 但还是遇到一些问题,记录如下: 1. 配置完成后,restart apache,出现 the ...
- kali kvm Requested operation is not valid: network 'default' is not active
安装时候参考的:http://www.ilanni.com/?p=6101 今天安装完kvm,满是幸福的装了个xp,重启后出现了一个错误 Requested operation is not vali ...
- (windows下的)Apache无法启动解决 the requested operation has failed
以下文章是转载别人的,这里只做学习用 ============================================================================== ...
- The server has either erred or is incapable of performing the requested operation. (HTTP 500)
感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限,错误之处在所难免,欢迎指正. 假设转载.请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167 原博文地 ...
- Win7共享问题 映射网盘时出现的错误 the specified server cannot perform the requested operation
Win7共享问题 映射网盘时出现的错误:the specified server cannot perform the requested operation 解决方案: 1.重启电脑: 2.修改注册 ...
- ApacheHttpServer出现启动报错:the requested operation has failed解决办法
转自:https://www.jb51.net/article/21004.htm 原因一:80端口占用 例如IIS,另外就是迅雷.我的apache服务器就是被迅雷害得无法启用! 原因二:软件冲突 装 ...
随机推荐
- 力扣258(java)-各位相加(简单)
题目: 给定一个非负整数 num,反复将各个位上的数字相加,直到结果为一位数.返回这个结果. 示例 1: 输入: num = 38输出: 2 解释: 各位相加的过程为:38 --> 3 + 8 ...
- 阿里云拨测:主动探测Web应用质量,助力提升用户体验
简介: 阿里云拨测是一种针对互联网应用(Web页面.网络链路等)进行应用性能和用户体验监测的服务,无需嵌码即可为云上用户提供开箱即用的企业级主动拨测式应用监测解决方案. 随着中国数字化经济的蓬勃发展, ...
- localstory,sessionstory,vuex,cook
函数式组件 1.特点 没有this(没有实例) 没有响应式数据 它只是一个接受一些 prop 的函数. render MVVM分为Model.View.ViewModel三者. Model:代表数据模 ...
- 由初中生实现的 Windows 12 网页版!
大家好,我是 Java陈序员. 这几天,逛 Github 的时候,看到了一个项目 win12 -- 仿 Windows12 网页版!被它实现的页面功能震撼到了,大家可以一起来感受下! 首先是登录页面. ...
- 【Android】Binder的Oneway拦截
在某些虚拟化,免安装,打点,环境检测,拦截器等场景,针对Android系统服务接口的拦截是常用的技术方案.通常只是针对正向的接口调用,如果涉及被动的服务回调拦截,则实现起来就有些许麻烦. 说明 由于我 ...
- ruby http请求组件
github地址 https://github.com/rest-client/rest-client gemfile里添加 gem 'rest-client', '~> 2.0' 执行 bun ...
- fastposter v2.7.1 紧急发布 电商海报编辑器
fastposter v2.7.1 紧急发布 电商海报编辑器 fastposter海报生成器,电商海报编辑器,电商海报设计器,fast快速生成海报 海报制作 海报开发.二维码海报,图片海报,分享海报, ...
- Splashtop获5000万美元新投资 成为远程桌面行业独角兽
加利福尼亚州圣何塞,2021 年 1 月 27 日 - 下一代远程访问和远程支持领域的新兴领导者 Splashtop Inc. 完成了新一轮的 5000 万美元融资,其估值已超过了 10 亿美元的独角 ...
- C语言:ACLLIB图形库——如何搭建环境(附三个文件代码)
看一下我配置完的运行结果: 1)首先创建一个项目. 2)选择win项目和C语言 3)然后找到你保存项目的文件夹里面拷贝两个.c和.h文件,两个文件代码我附在最后. 4)现在还不能用,找到项目属性 5) ...
- 🔥 Java Solon v2.7.6 发布
Java Solon 是什么框架? Java "新的"应用开发框架.开放原子开源基金会,孵化项目.从零开始构建(非 java-ee 架构),有灵活的接口规范与开放生态. 追求: 更 ...