Exemplo n.º 1
0
        public override void Uninstall(IDictionary savedState)
        {
            base.Uninstall(savedState);
            try
            {
                if (savedState.Contains("conStr"))
                {
                    string targetdir = this.Context.Parameters["targetdir"].ToString();

                    RijndaelCryptography rijndael = new RijndaelCryptography();

                    rijndael.Key = (byte[])savedState["key"];

                    rijndael.IV = (byte[])savedState["IV"];

                    conStr = rijndael.Decrypt((byte[])savedState["conStr"]);

                    SqlConnection sqlCon = new SqlConnection(conStr);

                    ExecuteDrop(sqlCon);
                }
            }
            catch (Exception) { }
        }
Exemplo n.º 2
0
        public override void Uninstall(IDictionary savedState)
        {
            base.Uninstall(savedState);
            try
            {
                if (savedState.Contains("conStr"))
                {

                    string targetdir = this.Context.Parameters["targetdir"].ToString();

                    RijndaelCryptography rijndael = new RijndaelCryptography();

                    rijndael.Key = (byte[])savedState["key"];

                    rijndael.IV = (byte[])savedState["IV"];

                    conStr = rijndael.Decrypt((byte[])savedState["conStr"]);

                    SqlConnection sqlCon = new SqlConnection(conStr);

                    ExecuteDrop(sqlCon);

                }
            }
            catch (Exception) { }
        }