It's looking claim are not available for that user. Try to first check if there is any claim available or not. Use following code:
var subjectId = HttpContext.User.Identity.GetAuthenticationMethods().Count() > 0 ? HttpContext.User.Identity.GetSubjectId() : "";
Posted On:
23-May-2018 05:26