You are developing an ASP.NET MVC 2 Web Application.
You need to implement an asynchronous controller named AccountingController, and you must ensure that the
export action required proper authorization.
Which code segment should you use?
A.
public class AccountingController : Controller
{
public void ExportAsync() {…}
[Authorise]
public void ExportCompleted() {…}
}
B.
public class AccountingController : AsyncController
{
[Authorise]
public void ExportAsync() {…}
public void ExportCompleted() {…}
}
C.
public class AccountingController : AsyncController
{
[Authorise]
public void Export() {…}
}
D.
public class AccountingController : Controller
{
[Authorise]
public void ExportAsync() {…}
[Authorise]
public void ExportCompleted() {…}
}