Q:

TempData null redirecting to View - after migrating to ASP.NET Core 3

After migrating to ASP.Net Core 3.0 my TempData is always null after redirecting to a View. Is there something wrong or missing at my startup.cs code?

A:

Try this part of code in startup.cs:
services.AddControllersWithViews().AddSessionStateTempDataProvider()

