/[AnywhereTS-MSSQL]/trunk/TSAdminTool/ProSupport.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/ProSupport.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/TSAdminTool/ProSupport.cs	2012/07/12 14:17:14	46
+++ trunk/TSAdminTool/ProSupport.cs	2012/07/14 00:36:23	91
@@ -11,6 +11,7 @@
 using System.IO;
 using System.Management;
 using System.Net;
+using log4net;
 
 // Support class for the AnywhereTS version. This file should only be included in the Pro version.
 namespace AnywhereTS
@@ -26,7 +27,7 @@
         // Registry keys
         public const string strRegTFTP_root = "TFTP_root"; // Reg key for TFTP root directory in database
         public const string strRegDatabaseDir = "DatabaseDir"; // Reg key for database directory
-        public const string strRegDatabaseServer = "DatabaseServer"; // Reg key for database server
+        public const string strRegDatabaseServer = "AnywhereTSServer"; // Reg key for database server
         public const string strRegDestDir = "DestDir"; // Reg key for Destination directory, used in unmanged mode..
         
         // Database constants
@@ -38,7 +39,7 @@
         public static atsDataSetTableAdapters.TerminalServerTableAdapter terminalServerTableAdapter; // The AnywhereTS application data adapter for the terminal servers table. Only this adapter should be used.
         public static atsDataSetTableAdapters.AppInfoTableAdapter appInfoTableAdapter; // The AnywhereTS application data adapter for the AppInfo table. Only this adapter should be used.
 
-        public static string strDatabaseServer; // If this computer does not contain the database server, this is the name of the database server that contains the ATS database. Used by the Control Panel
+        public static string strAnywhereTSServer; // If this computer does not contain the database server, this is the name of the database server that contains the ATS database. Used by the Control Panel
         
         // Directories
         public static string strDatabasePath; // The directory where the database file is located.
@@ -50,7 +51,7 @@
             // Initiate variables from registry
             strDatabasePath = ATSGlobals.GetATSRegValueString(strRegDatabaseDir);
             strDestDir = ATSGlobals.GetATSRegValueString(strRegDestDir);
-            strDatabaseServer = ATSGlobals.GetATSRegValueString(strRegDatabaseServer);
+            strAnywhereTSServer = ATSGlobals.GetATSRegValueString(strRegDatabaseServer);
         }
 
         // Loook up local IP for computer 
@@ -226,7 +227,15 @@
                 }
             }
             else
-                throw new Exception("Unknown TFTP mode 28158");
+            {
+                string error = "Error: Unknown TFTP Config mode (28158)";
+                using (log4net.NDC.Push(string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)))
+                {
+                    Logging.ATSAdminLog.Error(error);
+                }
+                MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)));
+                return;
+            }
         }
 
         // Copy image file to all external tftp directories/servers
@@ -346,7 +355,15 @@
                 }
             }
             else
-                throw new Exception("Unknown TFTP mode 48158");
+            {
+                string error = "Error: Unknown TFTP Config mode (48158)";
+                using (log4net.NDC.Push(string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)))
+                {
+                    Logging.ATSAdminLog.Error(error);
+                }
+                MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)));
+                return;
+            }
         }
 
 
@@ -464,7 +481,15 @@
                 }
             }
             else
-                throw new Exception("Unknown TFTP mode 88158");
+            {
+                string error = "Error: Unknown TFTP Config mode (88158)";
+                using (log4net.NDC.Push(string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)))
+                {
+                    Logging.ATSAdminLog.Error(error);
+                }
+                MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)));
+                return;
+            }
 
             WriteHostsFiles();
             ATSImageRuntimeConfig currentConfig = new ATSImageRuntimeConfig();

 

  ViewVC Help
Powered by ViewVC 1.1.22