Ejemplo n.º 1
0
        public ActionResult ServerError(ErrorReport report, bool?hideDetails)
        {
            // Show details only if the user is allowed to.

            var showDetails = _devAuthenticationManager.IsLoggedIn(HttpContext) &&
                              (hideDetails != null && !hideDetails.Value);

            // Save the error report in the session in case it is needed later or pull it out if it is already there.

            if (report != null && report.Exception != null && Session != null)
            {
                Session[ErrorReportSessionKey] = report;
            }
            else if (showDetails && Session != null)
            {
                report = Session[ErrorReportSessionKey] as ErrorReport;
            }

            return(ServerError(report, showDetails));
        }
Ejemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (_devAuthenticationManager.IsLoggedIn(HttpContext.Current))
            {
                ProcessTestCommand();
                phAuthenticated.Visible = true;
            }
            else
            {
                phAuthRequired.Visible = true;
                SetFocusOnControl(txtPassword);
            }
        }