private void DirectMigration_Connection() { // Save configuration this.Save_SourceConfiguration(); this.Save_DestinationConfiguration(); IReportServerReader reader = null; IReportServerWriter writer = null; string srcVersion = "2005-SRC"; string destVersion = "2005-SRC"; if (this.cboSrcVersion.SelectedIndex > this.cboDestVersion.SelectedIndex) { throw new Exception("Source server is newer than destination server."); } if (this.cboSrcVersion.SelectedIndex == 0) { srcVersion = "2005-SRC"; } else { srcVersion = "2010-SRC"; } if (this.cboDestVersion.SelectedIndex == 0) { destVersion = "2005-DEST"; } else { destVersion = "2010-DEST"; } // If source server is the same as the destination server and the root paths are the same, throw exception if (this.txtSrcUrl.Text.ToLower() == this.txtDestUrl.Text.ToLower() && this.txtSrcPath.Text.ToLower() == this.txtDestPath.Text.ToLower()) { throw new Exception("You cannot migrate to the same path on the same server."); } // Test the source connection this.TestSourceConnection(true); // Test the destination connection this.TestDestinationConnection(true); reader = this.mKernel.Get <IReportServerReader>(srcVersion); writer = this.mKernel.Get <IReportServerWriter>(destVersion); // Check source and destination server versions through the reader and writer SSRSVersion sourceVersion = reader.GetSqlServerVersion(); SSRSVersion destinationVersion = writer.GetSqlServerVersion(); // If the destination version is older than the source version, prevent migration. if ((int)destinationVersion < (int)sourceVersion) { throw new Exception("Destination server is using an older version of SQL Server than the source server."); } writer.Overwrite = this.cbkDestOverwrite.Checked; // Resolve PythonEngine from kernel PythonEngine engine = this.mKernel.Get <PythonEngine>(destVersion); this.PerformDirectMigrate( this.txtSrcUrl.Text, this.txtSrcPath.Text, this.txtDestUrl.Text, this.txtDestPath.Text, reader, writer, engine); }