'ERR_HTTP2_PROTOCOL_ERROR when using TempData in ASP.NET Core 6

When I don't use TempData, the page works fine, but when I use it I get the following error.

This site can’t be reachedThe webpage at https://localhost:44332/Home/UploadFile might be temporarily down or it may have moved permanently to a new web address.
ERR_HTTP2_PROTOCOL_ERROR

Here's the code of the controller

TempData["Response"] = responseString;
return RedirectToAction("Index");

Any ideas??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source