I am making a request to a .net framework 4.8
controller route, and for some reason on Chrome browser when throttling the network speed to slow, HttpContext.Current.Request.Params
, HttpContext.Current
will be null. When I turn throttling off, the params will be there populated.
[HttpPost]
[Route("post-data")]
public async Task<IHttpActionResult> 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;
}
5