Setting a timeout for Ajax.BeginForm() in MVC
I have a query that ta开发者_Python百科kes a while to return results on our staging box and it has been wired to the front-end using an ASP.NET MVC Ajax.BeginForm()
. I have searched the help and the internet but can't seem to find a way to extend the timeout for this operation.
Add NoAsyncTimeout to the Controller that the form is calling.
[HttpPost]
[NoAsyncTimeout]
public async Task<string> MyActionMethod(SomeClass model)
{
Thread.Sleep(100000);
return "Finished";
}
精彩评论