我从我的视图中调用一个控制器方法,这个方法有一些很长的过程
[HttpPost]
public async Task<IActionResult> MyControllerMethod(MyViewModel viewModel)
{
await MyFile.Longprocess);
return PartialView("_MyPartialPage");
}
当进程花费的时间超过2分钟时,我在调试模式下出现以下错误
发生错误:状态:错误,描述:错误网关
可悲的是,我没有在scriptTimeout
中找到ASP .NET Core
的任何解决方案,就像我们在MVC中一样
HttpContext.Current.Server.ScriptTimeout = 90000;
在某些RnD之后,我found out在RequestTimeout="00:30:00"
标记上设置aspNetCore
只能在发布模式下运行,并且从Visual Studio调试模式运行时仍会出现问题。
那么有没有办法在Visual Studio 2017调试模式下设置超时?任何形式的帮助将不胜感激。