程序突然卡死应用程序池自动回收还是重启
程序: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