Dereference of a possibly null reference

Viewed 14
@if (User.Identity.IsAuthenticated && User.IsInRole("Admin"))

Dereference of a possibly null reference in the User.Identity part of this code. I get an error. How can i solve it? Please help me

0 Answers
Related