MvcMailer中的SendAsync电子邮件错误

时间:2012-10-04 07:09:28

标签: asp.net-mvc mvcmailer

当我想在我的控制器中使用MvcMailer的SendAsync方法发送邮件Async时出现此错误:

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。

导致此错误的原因是什么?

0 个答案:

没有答案