I need advice of where to put custom user authorization code in ASP.NET Core. I am somewhat a ASP.NET Framework developer and normally I will add code to Global.asax as a session_onstart event to look up a SQL table where users profile are stored that is used to determine what they can view in the rest of the application. With Global.asax this is only cause once per user session, so what I would like to do is the same kind of approach in ASP.NET Core which I am kind of new to but need advice where that check should be done
CodePudding user response:
I would like to do is the same kind of approach in ASP.NET Core which I am kind of new to but need advice where that check should be done
Well, based on your description, in asp.net core
you can achieve that in many ways. For instances, you could set in following places: