Replies: 2 comments 3 replies
-
I had a similar issue and resolved it by adding the following to the end of the Configure method in the Startup.cs file:
Take a look at discussion #1719 . |
Beta Was this translation helpful? Give feedback.
-
It is important to remember that web servers are stateless - so they don't remember anything from one postback to the next. That includes the user's identity. ASP.NET Core has mechanisms (often using an auth cookie) to maintain some info about the user over time. You need to enable the aspnetcore middleware to take that info and restore the user identity on each postback. This really has nothing to do with CSLA at all, as what is used is standard aspnetcore authentication functionality. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I'm a little stuck on how to implement a few things in my .Net Core 3.1 Razor Pages MVC application using Azure AD.
My application authenticates a user and I can see roles are loaded (thanks PTIdentity & PTPrincipal), but subsequent calls involving Csla.ApplicationContext.User shows 'CslaUnauthenticatedUser' as the value and my Business Object write authorization rules fail, I have a feeling these are related, and is a result of something I have not done, and do not know just yet!
I've not come across any examples of how to do Csla .Net Core authentication & authorization in Razor Pages.
Can anybody share examples of how to do this?
I would also be happy with just a list of how to do this.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions