IMPORTANT!
This forum is now archived. Click here for the New Support Forum
User Information
Quote from joe.gloeckner on March 21, 2018, 4:52 pmI am trying to get the user information with User.Identity in web controllers and/or the DAL repository classes. Most of the information is null even when logged in. Is there a way for me to access it? Please see attached file.
I am trying to get the user information with User.Identity in web controllers and/or the DAL repository classes. Most of the information is null even when logged in. Is there a way for me to access it? Please see attached file.
Quote from MarcoBaptista on March 21, 2018, 8:29 pmI have not the same problem but something related with, sorry for the hijacking, when I try to access to roles, the users list or the user information, I have this error:
An error occured whilst saving configuration defaults. Errors: "error: IDX10803: Unable to obtain configuration from: 'http://localhost:5151/.well-known/openid-configuration'."
BTW my version is the standrad with Bootstrap 4.
I have not the same problem but something related with, sorry for the hijacking, when I try to access to roles, the users list or the user information, I have this error:
An error occured whilst saving configuration defaults. Errors: "error: IDX10803: Unable to obtain configuration from: 'http://localhost:5151/.well-known/openid-configuration'."
BTW my version is the standrad with Bootstrap 4.
Quote from joe.gloeckner on March 22, 2018, 3:44 pmI'm realizing context.CurrentUserId is null as well. It gets set here. Could you please help me out?
public HttpUnitOfWork(ApplicationDbContext context, IHttpContextAccessor httpAccessor) : base(context)
{
context.CurrentUserId = httpAccessor.HttpContext?.User.FindFirst(ClaimConstants.Subject)?.Value?.Trim();
}
I'm realizing context.CurrentUserId is null as well. It gets set here. Could you please help me out?
public HttpUnitOfWork(ApplicationDbContext context, IHttpContextAccessor httpAccessor) : base(context)
{
context.CurrentUserId = httpAccessor.HttpContext?.User.FindFirst(ClaimConstants.Subject)?.Value?.Trim();
}
Quote from MarcoBaptista on March 23, 2018, 10:27 amI solve my problem, in appsettings.json, appsettings.development.json change
"ApplicationUrl": "http://localhost:5151"to
"ApplicationUrl": "http://localhost:5000"
I solve my problem, in appsettings.json, appsettings.development.json change
to
Quote from joe.gloeckner on March 23, 2018, 3:53 pmThanks for responding Marco, unfortunately the application URL is already set to the correct url.
Eben, do you have any ideas here?
Thanks for responding Marco, unfortunately the application URL is already set to the correct url.
Eben, do you have any ideas here?
IMPORTANT!
This forum is now archived. Click here for the New Support Forum