In my .Net Core web app, I have used the scaffolding feature and a few online examples, to come up with some account pages and manage pages. I was able to successfully register, and I can see the account info in the AspNetUsers table. Most of the other pages in the example run one command that gets the current user, it's in a helper method.
return _userManager.GetUserAsync(HttpContext.User);
That line returns an Application user, which is what I want. However, I keep getting this error: "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" I'm assuming it's talking about the ID, and I checked the table and the ID is indeed a Guid, and there is one present. I placed the same line in a try/catch and it's the execution of that line that is causing the error. Any ideas?
Edit: My question is actually more related to the question that LarsTech linked below. I used a slight mod to that answer, which I will answer below.