开发者

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";
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜