打赏

程序突然卡死应用程序池自动回收还是重启

程序:netframework 4.5 webapi

接口用了async await

问题:程序突然卡死应用程序池自动回收还是重启

解决方案:

webconfig中加了两行配置如下:

<add key="aspnet:AllowAsyncDuringSyncStages" value="true" />
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />

 

 

参考资料:

https://docs.microsoft.com/zh-cn/archive/msdn-magazine/2014/october/async-programming-introduction-to-async-await-on-asp-net

https://docs.microsoft.com/en-us/archive/msdn-magazine/2014/october/async-programming-introduction-to-async-await-on-asp-net

https://cloud.tencent.com/developer/ask/sof/120325

posted @ 2022-08-20 09:37  刘奇云  阅读(98)  评论(0编辑  收藏  举报