开发者

Setting a timeout for Ajax.BeginForm() in MVC

开发者 https://www.devze.com 2022-12-18 12:29 出处:网络
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 in

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

精彩评论

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