1

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??

jps
  • 20,041
  • 15
  • 75
  • 79
  • Did you check length of the `responseString`? – Jackdaw Feb 18 '22 at 11:03
  • You are correct, my responseString was too long. By the way what needs to be used to pass huge data? – Muhammad Usama Alam Feb 18 '22 at 13:11
  • 2
    The `TempData` uses [HTTP cookies or session state](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-6.0#state-management). You an try few ways to increment a request size limit: [https://stackoverflow.com/a/45927665/6630084](https://stackoverflow.com/a/45927665/6630084) – Jackdaw Feb 19 '22 at 06:00

0 Answers0