Session: Cannot convert int to byte[] in ASP.NET Core 3.0 C#

I tried to look up how to use the new way of using sessions in core 3.0.

It goes like:
HttpContext.Session.Set("UserID", ???);, except I can’t fill in an int.

I tried to look it up on the official microsoft site, but that one only had HttpContext.Session.SetInt32 or HttpContext.Session.SetString.

How do you use the new set from core 3.0?

Leave a Reply

Your email address will not be published. Required fields are marked *