我在asp.net WebApi操作中添加了以下行(完全按照原样,所以您也可以尝试):
new SmtpClient { DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory它导致操作等待几秒钟,直到抛出An asynchronous module or handler completed while an asynchronous operation was still pending.的500个错误,asp.net才清楚地检测到有一个异步任务正在运行。为什么as