Ejemplo n.º 1
0
        private static bool handleWin32Exception(Win32Exception ex, MethodBase Method)
        {
            Logging.Logger("ERROR: MethodName =" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.NativeErrorCode + "  Message:" + ex.Message);
            switch (ex.NativeErrorCode)
            {
            case 1909:
                //Locked account
                PromptUser("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.NativeErrorCode + "  Message:" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Network Error");
                SecurityTools.ClearAdminCreds();
                return(true);

            case 1326:
                //Bad credentials error. Clear AdminCreds
                PromptUser("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.NativeErrorCode + "  Message:" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Network Error");
                SecurityTools.ClearAdminCreds();
                return(true);

            case 86:
                //Bad credentials error. Clear AdminCreds
                PromptUser("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.NativeErrorCode + "  Message:" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Network Error");
                SecurityTools.ClearAdminCreds();
                return(true);

            case 5:
                //Access denied error. Clear AdminCreds
                PromptUser("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.NativeErrorCode + "  Message:" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Network Error");
                SecurityTools.ClearAdminCreds();
                return(true);

            default:
                PromptUser("ERROR:  MethodName=" + Method.Name + "  Type: " + ex.GetType().Name + "  #:" + ex.NativeErrorCode + "  Message:" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Network Error");
                return(true);
            }
        }
Ejemplo n.º 2
0
 public static string SetCurrentDomain(DatabaseName database)
 {
     _currentDomain = DomainNames[database];
     SecurityTools.ClearAdminCreds();
     if (database == DatabaseName.vintondd)
     {
         SecurityTools.VerifyAdminCreds("Credentials for Vinton AD");
     }
     return(DomainNames[database]);
 }
Ejemplo n.º 3
0
        private void CriticalStop(object sender, EventArgs e)
        {
            StopQueue();
            OtherFunctions.Message("The queue was stopped because of an access error. Please re-enter your credentials.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, "Queue Stopped", this);
            SecurityTools.ClearAdminCreds();

            if (SecurityTools.VerifyAdminCreds())
            {
                StartQueue();
            }
        }
Ejemplo n.º 4
0
 private void ReEnterLACredentialsMenuItem_Click(object sender, EventArgs e)
 {
     SecurityTools.ClearAdminCreds();
     SecurityTools.VerifyAdminCreds();
 }
Ejemplo n.º 5
0
 private void CopyCritcalError(object sender, EventArgs e)
 {
     cancel = true;
     SecurityTools.ClearAdminCreds();
 }