Use Cookies and Session To Store TempData In ASP.NET Core

If you ever used TempData in ASP.NET MVC, you are probably aware that by default TempData is stored in Session state. This means the web application must have sessions enabled. Luckily, ASP.NET Core 2.0 provides two TempData providers - Cookie based and Session State based. To that end this article shows how to use both of them in an ASP.NET Core application.

http://www.binaryintellect.net/articles/090f0fe3-d52c-4386-9d30-6311c2d62738.aspx