Showing posts from 2020

Storing Objects in In-Memory Session in Asp.Net Core

Since you are here, you already know the challenges of not being able to use Session in the same way as was possible in the days of .Net Framework. Hence I will get straight to the point of how to do this - without trying to tell you why you shouldn't store object in the session, because if you have a use case for storing session, then you need to know how to do it right - and how not to do it as well. This article's approach should be taken as an interim while you are migrating your old apps from Asp.Net Framework to Asp.Net Core - with a long term plan to move away from session objects all together.  In case any of you need the code for this article, send an email to  I have now also implemented a framework for session less system, and migrated my systems to it, therefore the code takes a very different approach of storing the objects compared to the method i have shown in this article, I can conduct a short lecture for your team with approp