Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个查询需要一段时间才能在我们的暂存盒上返回结果,并且它已使用 ASP.NET MVC 连接到前端Ajax.BeginForm()。我已经搜索了帮助和互联网,但似乎无法找到延长此操作超时的方法。
Ajax.BeginForm()
将 NoAsyncTimeout 添加到表单正在调用的控制器。
[HttpPost] [NoAsyncTimeout] public async Task<string> MyActionMethod(SomeClass model) { Thread.Sleep(100000); return "Finished"; }