I managed to find the right one. He is lower.
bool val1 = System.Web.HttpContext.Current.User.Identity.IsAuthenticated
EDIT
The credit for this edit refers to @Gianpiero Caretti , who suggested this in a comment.
bool val1 = (System.Web.HttpContext.Current.User != null) && System.Web.HttpContext.Current.User.Identity.IsAuthenticated
BlueBird May 22 '11 at 7:32 2011-05-22 07:32
source share