Я делаю запрос к маршруту контроллера .net framework 4.8 и по какой-то причине в браузере Chrome при замедлении скорости сети HttpContext.Current.Request.Params, HttpContext. Текущий будет нулевым. Когда я отключу регулирование, параметры будут заполнены.
[HttpPost]
[Route("post-data")]
public async Task Post()
{
// HttpContext.Current.Server is null here
string root = HttpContext.Current.Server.MapPath("~/root");
try
{
// HttpContext.Current.Request.Params is null here
var response = HttpContext.Current.Request.Params.Get("someValue");
if (!validated)
{
// Error handling
}
else
{
// Process rest of form data in HttpContext.Current.Request.Params
}
}
catch (Exception ex)
{
}
finally
{
}
return someThing;
}
Подробнее здесь: https://stackoverflow.com/questions/789 ... work-speed