When you migrate your site from ASP.NET MVC on netfx to ASP.NET Core on .net core you might run into the problem what to do with the Session_Start method in global.asax: what's the equivalent in ASP.NET Core ?
Searching on the internet will likely make you end up on forum posts / stackoverflow posts telling you to 'write some middleware', but what does that mean? How to do that? If you feel as lost as I was, read on as this post is for you.