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服务器就是被迅雷害得无法启用! 原因二:软件冲突 装 ...
随机推荐
- [ARC174B] Bought Review 题解
[题目描述] 你开了一家店,有 \(A_i\) 个 \(i\) 星级评论,你可以花费 \(P_i\) 元买到一个 \(i\) 星评论,问使得这家店评论的星星平均值不小于 \(3\),最少要花多少钱. ...
- HarmonyOS NEXT应用开发之预加载so并读取RawFile文件
介绍 本示例主要介绍在TaskPool子线程中使用 dlopen 预加载 so 库并使用句柄调用库函数的方法,以及在Native中使用 pread 系统函数读取Rawfile文件的部分文本内容,并添加 ...
- 持续定义Saas模式云数据仓库+实时分析
简介: 从实时分析的价值.场景和数据流程,以及用户对平台能力要求展开,讲述云数据仓库MaxCompute的产品能力优势 ,面对实时分析场景的能力演进要求.进而以实时分析典型场景的全数据流程处理.建模和 ...
- 这是阿里技术专家对 SRE 和稳定性保障的理解
简介: 在技术工作中,对于产品/基础技术研发和 SRE 两种角色,通常会有基于「是否侧重编码」的理解.对于产品研发转做 SRE ,经常会产生是否要「脱离编码工作」的看法,或者认为是否要「偏离对产品/基 ...
- e签宝:借助钉钉宜搭变革传统项目管理模式,交付效率显著提升
简介:通过钉钉宜搭,e签宝在半个月内搭建了项目交付管理平台,提升了项目管理的效率和质量,推进了团队核心业务的信息化建设.e签宝在有效梳理了各环节的工作进度.质量.成本.职权后,通过宜搭平台保障了内外 ...
- 云原生数据仓库AnalyticDB支撑双11,大幅提升分析实时性和用户体验
简介:2021年双十一刚刚落幕,已连续多年稳定支持双十一大促的云原生数据仓库AnalyticDB,今年双十一期间仍然一如既往的稳定.除了稳定顺滑的基本盘之外,AnalyticDB还有什么亮点呢?下面 ...
- Serverless 时代下大规模微服务应用运维的最佳实践
简介: 原来的微服务用户需要自建非常多的组件,包括 PaaS 微服务一些技术框架,运维 IaaS.K8s,还包括可观测组件等.SAE 针对这些方面都做了整体的解决方案,使用户只需要关注自己的业务系统, ...
- Pod进阶篇-Pod生命周期和健康探测以及startupProbe(6)
一.Pod容器探测和钩子 1.1 容器钩子:postStart和preStop postStart:容器创建成功后,运行前的任务,用于资源部署.环境准备等. preStop:在容器被终止前的任务,用于 ...
- vue+js实现点击图片,图片放大
1.首先在template中插入image,并赋予点击事件(这个时候是小图) <template> <div> <img src="@/assets/image ...
- 鸿蒙HarmonyOS实战-Stage模型(ExtensionAbility组件)
一.ExtensionAbility组件 1.概念 HarmonyOS中的ExtensionAbility组件是一种能够扩展系统功能的能力组件.它可以通过扩展系统能力接口,为应用程序提供一些特定的功能 ...