public void SetState(object state, bool isNavigatingBack = false)
        {
            if (state != null)
            {
                this.IISServers = (IISServers)state;
                foreach (string url in Helper.UrlsForCookie)
                {
                    Helper.InternetSetCookie(url, null, "AZMigrationTool = SkipHeaderAndFooter");
                }

                string urlToNavigate = Helper.UrlCombine(
                         Helper.PostMigratePortal,
                         Helper.Results,
                         Helper.AzureMigrationId);
                if (isNavigatingBack)
                {
                    urlToNavigate = Helper.UrlCombine(Helper.ScmSitePrimary, "/picksubscription/index", Helper.AzureMigrationId);
                }

                siteBrowser.Navigate("about:blank");
                siteBrowser.Navigate(urlToNavigate);
                checkPublishSettingsTimer.Enabled = true;
            }
            else
            {
                // allow user to upload their own publish settings
                //this.arePublishSettingsManual = true;
                //this.uploadPublishingSettingsPanel.Visible = true;
                //this.siteBrowser.Visible = false;
            }

            btnPublish.Visible = false;
        }
 public void SetState(object state, bool isNavigatingBack = false)
 {
     if (state != null)
     {
         this.IISServers = (IISServers)state;
     }
 }
 public void SetState(object state, bool isNavigatingBack = false)
 {
     if (state != null)
     {
         this.IISServers = (IISServers) state;
         DisplayReadinessReportInfo();
         this.UploadButton.Enabled = this.SaveFileLocallyLinkLabel.Enabled = true;
     }
 }
        public void SetState(object state, bool isNavigatingBack = false)
        {
            if (state != null)
            {
                this.IISServers = (IISServers)state;
            }

            if (!_providerSettingsInitialized)
            {
                _providerSettingsInitialized = true;
                InitializeProviderSettings();
            }

            if (!isNavigatingBack)
            {
                TryDeployment(false);
            }
        }
 public void SetState(object state, bool isNavigatingBack = false)
 {
     this.IISServers = new IISServers();
     ProcessIISInfo();
 }
        public void SetState(object state, bool isNavigatingBack = false)
        {
            busyPictureBox.Visible = true;
            if (state != null)
            {
                this.IISServers = (IISServers)state;
            }

            long builderLength = 0;
            if (ErrorBuffer.Length > 0)
            {
                ErrorBuffer.Remove(0, ErrorBuffer.Length);
            }

            foreach (var server in this.IISServers.Servers.Values)
            {
                foreach (Site website in server.Sites.Where(s => s.PublishProfile != null && !string.IsNullOrEmpty(s.SiteCreationError)))
                {
                    ErrorBuffer.AppendFormat("Site: {0} creation failed. {1} (server: {2})\r\n", website.SiteName, website.SiteCreationError, server.Name);
                }
            }

            foreach (var server in this.IISServers.Servers.Values)
            {
                foreach (Site website in server.Sites.Where(s => s.PublishProfile != null && (!s.ContentPublishState || !s.DbPublishState)))
                {
                    if (ErrorBuffer.Length < MaxBufferLength)
                    {
                        string contentTrace = string.Empty;
                        string dbTrace = string.Empty;

                        if (File.Exists(website.PublishProfile.ContentTraceFile))
                        {
                            contentTrace = File.ReadAllText(website.PublishProfile.ContentTraceFile).Replace("<", " ").Replace(">", " ");
                        }

                        if (builderLength + contentTrace.Length <= MaxBufferLength)
                        {
                            ErrorBuffer.AppendLine(contentTrace);
                        }

                        if (File.Exists(website.PublishProfile.DbTraceFile))
                        {
                            dbTrace = File.ReadAllText(website.PublishProfile.DbTraceFile).Replace("<", " ").Replace(">", " ");
                        }

                        if (builderLength + dbTrace.Length <= MaxBufferLength)
                        {
                            ErrorBuffer.AppendLine(dbTrace);
                        }
                    }
                }
            }

            foreach (string url in Helper.UrlsForCookie)
            {
                Helper.InternetSetCookie(url, null, "AZMigrationTool = SkipHeaderAndFooter");
            }

            emailBrowser.Navigate(Helper.UrlCombine(
                     Helper.ScmSitePrimary,
                     Helper.Mail));
            checkMailSettingsTimer.Enabled = true;
        }
 public MigrationSite()
 {
     InitializeComponent();
     this.IISServers = null;
 }
 public SiteStatusControl()
 {
     InitializeComponent();
     IISServers = null;
 }