예제 #1
0
        protected void DoLogin(object sender, EventArgs e)
        {
            try
            {
                string    usernameText = username.Value.Trim(), passwordText = password.Value.Trim();
                NodeVisit visit = _securityService.AuthenticateAdmin(
                    new AuthenticationCredentials(usernameText, passwordText),
                    _visitProvider.GetRequestorIP());

                _accountService.ValidateUserMinimumRole(visit, SystemRoleType.Program);

                Session[Constants.AUTH_SESSION_NAME] = visit;

                FormsAuthentication.RedirectFromLoginPage(usernameText, false);
            }
            catch (Exception ex)
            {
                LOG.Error(ex.Message, ex);
                divPageError.Visible   = true;
                divPageError.InnerText = UIUtility.ParseException(ex);
            }
        }
예제 #2
0
 protected void SetDivPageError(Exception ex)
 {
     LOG.Error(string.Empty, ex);
     SetDivPageErrorFormat(UIUtility.ParseException(ex), null);
 }
예제 #3
0
 protected void SetDivPageError(string messagePrefix, Exception ex)
 {
     LOG.Error(string.Empty, ex);
     SetDivPageErrorFormat(messagePrefix + UIUtility.ParseException(ex));
 }
예제 #4
0
 protected void SetDivPageError(HtmlContainerControl pageErrorDiv, Exception ex)
 {
     LOG.Error(string.Empty, ex);
     SetDivPageError(pageErrorDiv, UIUtility.ParseException(ex), null);
 }
예제 #5
0
 protected void AppendDivPageError(Exception ex)
 {
     LOG.Error(string.Empty, ex);
     AppendDivPageError(UIUtility.ParseException(ex), false, null);
 }