SyntaxFix
Write A Post
Hire A Developer
Questions
This should work:
User.Identity.Name
Identity returns an IPrincipal
Identity
IPrincipal
Here is the link to the Microsoft documentation.