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

Diff of /trunk/TSAdminTool/frmConfigServices.cs

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

--- trunk/TSAdminTool/frmConfigServices.cs	2012/07/11 14:19:13	4
+++ trunk/TSAdminTool/frmConfigServices.cs	2012/07/12 14:17:14	46
@@ -123,6 +123,10 @@
                 {
                     this.Cursor = Cursors.Default;
                     MessageBox.Show("Invalid path for the AnywhereTS shared network files.");
+                    using (log4net.NDC.Push(string.Format("path={0}", strPath)))
+                    {
+                        Logging.ATSAdminLog.Error("Invalid path for the AnywhereTS shared network files.");
+                    }
                     txtTFTPpath.Focus();
                     return;
                 }
@@ -136,6 +140,13 @@
                 {
                     this.Cursor = Cursors.Default;
                     MessageBox.Show("Could not create directory '" + strPath + "'. Error: " + ex.Message);
+                    using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
+                    {
+                        using (log4net.NDC.Push(string.Format("directory={0}", strPath)))
+                        {
+                            Logging.ATSAdminLog.Error("Could not create directory.");
+                        }
+                    }
                     txtTFTPpath.Select();
                     return;
                 }
@@ -524,6 +535,10 @@
                 {
                     this.Cursor = Cursors.Default;
                     MessageBox.Show("Could not set user access rights for TFTP directory. Do you have sufficient right? (29991). Error: " + ex.Message);
+                    using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
+                    {
+                        Logging.ATSAdminLog.Error("Could not set user access rights for TFTP directory.");                      
+                    }
                     return;
                 }
             }
@@ -630,7 +645,7 @@
             DialogResult result = folderBrowserDialog.ShowDialog();
             if (result == DialogResult.OK)
             {
-                string strPath; // The path provided by the user 
+                string strPath=""; // The path provided by the user 
 
                 // Browse to a folder by displaying the folder browse Dialog
                 try
@@ -640,6 +655,10 @@
                 catch (NotSupportedException)
                 {   // User has browsed to a non folder
                     MessageBox.Show("Object is not a file folder.");
+                    using (log4net.NDC.Push(string.Format("path={0}", strPath)))
+                    {
+                        Logging.ATSAdminLog.Error("Object is not a file folder.");
+                    }
                     goto Rebrowse;
                 }
                 txtTFTPpath.Text = strPath;

 

  ViewVC Help
Powered by ViewVC 1.1.22