public static void UserDoesNotHavePermitions(string errorMassage) { var config = InitializerSection.GetSection(); if (AccessDeniedException.IsInService()) { throw new AccessDeniedException(errorMassage); } HttpContext.Current.Response.Redirect(config.DoesNotHavePermitionsPage + "?ErrorMessage=" + HttpUtility.UrlEncode(errorMassage)); }
public static TResult GetPersonInfoRequired <TResult>() { var value = GetPersonInfo <TResult>(GetSID()); if (value == null) { if (AccessDeniedException.IsInService()) { throw new AccessDeniedException("User.GetPersonInfoRequired() is null"); } HttpContext.Current.Response.Redirect("/MainPage.aspx/data/NoPermit"); } return(value); }