2

当我想使用 MvcMailer 的 SendAsync 方法在我的控制器中发送邮件异步时,我遇到了这个错误:

System.InvalidOperationException
An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>.

我使用 MVC4。

这个错误的原因是什么?

4

0 回答 0