public void ProcessRequest(HttpContext context) { logger.Info("Started request"); try { if (!SecurityHelper.CheckAccess()) { context.Response.StatusCode = 401; context.Response.End(); return; } WriteResponse(context); } catch (NotImplementedException ex) { context.Response.StatusCode = 501; context.Response.Write(new JavaScriptSerializer().Serialize(ex.Message)); logger.Error(ex); } catch (Exception ex) { logger.Error("Exception occurred:", ex); throw; } logger.Info("Finished request"); }
protected override void OnInit(EventArgs e) { base.OnInit(e); if (!SecurityHelper.CheckAccess()) { AccessDenied(); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!SecurityHelper.CheckAccess()) { AccessDenied(); } if (IsPostBack) { return; } LoadData(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!SecurityHelper.CheckAccess()) { AccessDenied(); } if (IsPostBack) { return; } GetQueryStringParameters(); LoadAndDisplayData(); }