abp Cannot access a disposed object. A common cause of this error is disposing
框架:abp
异常信息:
An unhandled exception was thrown by the application.
System.ObjectDisposedException: Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
之前以为:
遇到这种情况一般是异步、同步混着调用了。
检查一下调用的地方是否为同步,但在实现函数里用异步得写法了。
昨天在使用hangfre的时候又重现了。。。。经过不断地google发现了一个帖子,解决了我的问题。之前的看法是错误的。
https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3544
以后出问题了还是多去官方git上看看issue。
转载于:https://www.cnblogs.com/zinan/p/10322134.html
abp Cannot access a disposed object. A common cause of this error is disposing相关推荐
- System.ObjectDisposedException: ‘Cannot access a disposed object.Object name: ‘Xamarin.Forms.Platfor
用Xamarin.Forms写移动程序时总出现: System.ObjectDisposedException: 'Cannot access a disposed object. Object na ...
- nested exception is org.flowable.common.engine.api.FlowableException: Error initialising dmn data mo
FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.F ...
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...
- vue学习中遇到的错误 Duplicate keys detected: ‘[object Object]‘. This may cause an update error.
前端入门自学,说错的请大神指点. Avoid using non-primitive value as key, use string/number value instead. Duplicate ...
- push代码至gitee码云报错unable to access 'https://gitee.com/*/git/': The requested URL returned error: 403
第一次使用idea整合gitee插件用来push代码的时候,不小心输错了用户名或密码,导致后续push代码,一直报错:unable to access 'https://gitee.com/*/git ...
- JavaScript内置对象→对象、系统函数、Date日期对象、String字符串对象、Math对象、Number数字对象、Object对象、Boolean对象、Error对象
对象 系统函数 Date日期对象 String字符串对象 Math对象 Number数字对象 Object对象 Boolean对象 Error对象
- git解决fatal: unable to access ‘https://gitee.com/XXX.git/‘: The requested returned error: 403
403无权限访问 windows用户凭据不一致导致 解决:控制面板->凭据管理器->windows凭据->git:https:gitxxx(把当前账户名更改上去)
- fatal: unable to access ‘https://gitee.com/****/****.git/‘: The requested URL returned error
mac 拉取服务器代码到本地时报错 git clone 的时候报错,百度很久没有找到答案,权限已经配置好的了,这个是前提哦. 后来才发现是clone的地址搞错了,gitee 默认的地址是HTTPS的, ...
- yii2 Syntax error or access violation: 1071 Specified key was too long Syntax error or access violat
我报错的是table %widget_text 修改的字段是key 设置起长度为191 eg: 'key' => $this->string(191)->notNull(),
- C#:在Task中使用依赖注入的Service/EFContext
dotnet core时代,依赖注入基本已经成为标配了,这就不多说了. 前几天在做某个功能的时候遇到在Task中使用EF DbContext的问题,学艺不精的我被困扰了不短的一段时间,于是有了这个文章 ...
最新文章
- GROMACS运行参数之nvt.mdp文件详解
- POJ2044 深搜+剪枝(云彩下雨)
- Matplotlib绘图库初探
- 黑莓GPRS上网套餐包月 300MB流量 不限CMWAP/CMNET
- java xwork_xwork-core-2.3.4源码 - 源码下载|通讯/手机编程|J2ME|源代码 - 源码中国
- 在苏州的一个超级棒的事情
- OpenGL noperspective在窗口空间中线性插值的实例
- Android内存优化2—使用软引用和弱引用
- Delphi编写后台监控软件
- miui替换官方文件解决无服务器,miui 关掉云服务器
- 谷粒商城RabbitMQ锁库存逻辑详解--新理解(长文警告)
- functor_纯Java中的Functor和Monad示例
- abp执行mysql语句_在ABP模板工程中使用MySql
- linux和python那个好学_Python和C#哪个好学?老男孩python
- 搜索python代码的软件_python小说爬虫工具,小说搜索下载软件附源码
- 使用Jorm简单的增删查改数据库
- .net微信开发吐血总结
- 教你如何做好移动支付行业
- 69期-Java SE-035_MySQL-6 存储过程、SQL练习 -doing
- 使用js脚本实现微信定时发送信息