Exemple #1
0
        /// <summary>
        /// execute task
        /// </summary>
        /// <returns></returns>
        public override bool Execute()
        {
            var admin = new ISSOAdmin();

            admin.DeleteApplication(ApplicationName);
            return(true);
        }
Exemple #2
0
        /// <summary>
        /// Imports the specified SSO config file to BizTalk SSODB.
        /// </summary>
        /// <param name="ssoKey">Key to import SSO file.</param>
        /// <param name="ssoEncryptedFile">Full path of the SSO config file, from where to import.</param>
        /// <param name="ssoConfigappName">Application name under which the SSO will be imported.</param>
        /// <param name="SSOConfigContactInfo">SSOConfigContactInfo , which will make the config visible in SSO Admin mmc. The name has to be the one which was specified while installing Microsoft SSO MMC snapIn tool.</param>
        /// <param name="redeploy">Boolean, Redeploy flag (True: Deletes existing SSO and imports the new, False : Imports the new SSO without deleting previous one).</param>
        /// <returns>Returns true/fasle.</returns>
        public static bool ImportSSOconfig(string ssoKey, string ssoEncryptedFile, string ssoConfigappName, string SSOConfigContactInfo, bool redeploy,
                                           out string exceptionMessage)
        {
            bool result = false;

            try
            {
                exceptionMessage = string.Empty;
                ISSOAdmin ssoAdmin = new ISSOAdmin();
                if (redeploy)
                {
                    ssoAdmin.DeleteApplication(ssoConfigappName);
                }
                MSBuildTasks.ImportSSOConfigurationApplicationTask import = new MSBuildTasks.ImportSSOConfigurationApplicationTask();
                import.EncryptionKey = ssoKey;
                import.EncryptedFile = ssoEncryptedFile;
                result = import.Execute();
                if (result)
                {
                    ssoAdmin.UpdateSSOCompanyName(ssoConfigappName, SSOConfigContactInfo);
                }
            }
            catch (Exception exe)
            {
                exceptionMessage = exe.Message;
                result           = false;
            }
            return(result);
        }
Exemple #3
0
        internal static void DeleteApp(string appName)
        {
            if (AppExists(appName))
            {
                DeleteConfigInfo(appName);

                ISSOAdmin ssoAdmin = new ISSOAdmin();
                ssoAdmin.DeleteApplication(appName);
            }
        }
Exemple #4
0
        /// <summary>
        /// Deletes an <see cref="AffiliateApplication"/> from the Enterprise Single Sign-On (SSO) server database.
        /// </summary>
        public void Delete()
        {
            if (!HasOwnership || _lazyConfigStoreCollection.Value.ContainsForeignConfigStores)
            {
                throw new InvalidOperationException(
                          $"To prevent any destructive effects, BizTalk.Factory will not delete an {nameof(AffiliateApplication)} "
                          + $"that it has not created or that has other {nameof(ConfigStore)}s than the default one.");
            }
            var ssoAdmin = new ISSOAdmin();

            ssoAdmin.DeleteApplication(Name);
        }
 public void DeleteApplication(string appName)
 {
     try
     {
         using (TransactionScope transactionScope = new TransactionScope())
         {
             ISSOAdmin iSSOAdmin = (ISSOAdmin) new SSOAdmin();
             this.Enlist(iSSOAdmin, Transaction.Current);
             iSSOAdmin.DeleteApplication(appName);
             transactionScope.Complete();
         }
     }
     catch (Exception ex)
     {
         EventLog.WriteEntry("SSOConfigCmdTool - DeleteApplication", ex.Message);
     }
 }
Exemple #6
0
 public void DeleteApplication(string appName)
 {
     try
     {
         using (TransactionScope transactionScope = new TransactionScope())
         {
             ISSOAdmin iSSOAdmin = (ISSOAdmin) new SSOAdmin();
             Enlist(iSSOAdmin, Transaction.Current);
             iSSOAdmin.DeleteApplication(appName);
             transactionScope.Complete();
             DoSsoEvent("DeleteApplication", string.Format("{0}", appName), false);
         }
     }
     catch (Exception ex)
     {
         DoSsoEvent("SSO Helper - DeleteApplication", ex.Message, true);
     }
 }
Exemple #7
0
 /// <summary>
 /// Deletes an SSO affiliate application.
 /// </summary>
 /// <param name="application">The name of the affiliate application to be deleted.</param>
 public void Delete(string application)
 {
     try
     {
         if (!Exists(application))
         {
             throw new Exception("The application does not exist.");
         }
         else
         {
             ISSOAdmin ssoAdmin = new ISSOAdmin();
             ssoAdmin.DeleteApplication(application);
         }
     }
     catch (Exception e)
     {
         throw new Exception("Failed to delete application " + application + ". " + e.Message);
     }
 }
        /// <summary>
        /// Remove the application
        /// </summary>
        /// <param name="appName"></param>
        public static void DeleteApplication(string appName)
        {
            ISSOAdmin ssoAdmin = new ISSOAdmin();

            ssoAdmin.DeleteApplication(appName);
        }
        /// <summary>
        /// Remove the application
        /// </summary>
        /// <param name="appName"></param>
        public static void DeleteApplication(string appName)
        {
            ISSOAdmin ssoAdmin = new ISSOAdmin();

            ssoAdmin.DeleteApplication(appName);
        }
Exemple #10
0
        /// <summary>
        /// Deletes SSO configuration from BizTalk DB for specified SSO Config application
        /// </summary>
        /// <param name="ssoConfigApplicaionName">SSO Config application name.</param>
        public static void DeteleSSOconfig(string ssoConfigApplicaionName)
        {
            ISSOAdmin ad = new ISSOAdmin();

            ad.DeleteApplication(ssoConfigApplicaionName);
        }