public void ResetPrincipalFromTicketIfExists() { if (FieldReportingPrincipal.CurrentPrincipal != null) { return; } var ticket = GetCurrentAuthenticationTicket(); if (ticket != null) { var userName = ticket.Name; var principal = new FieldReportingPrincipalFactory().CreatePrincipal(userName); FieldReportingPrincipal.CurrentPrincipal = principal; } }