/[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

revision 16 by william, Wed Jul 11 16:36:27 2012 UTC revision 47 by william, Thu Jul 12 14:29:34 2012 UTC
# Line 11  using System.Security.Principal; Line 11  using System.Security.Principal;
11  using System.IO;  using System.IO;
12  using System.Management;  using System.Management;
13  using System.Net;  using System.Net;
14    using log4net;
15    
16  // Support class for the AnywhereTS version. This file should only be included in the Pro version.  // Support class for the AnywhereTS version. This file should only be included in the Pro version.
17  namespace AnywhereTS  namespace AnywhereTS
# Line 148  namespace AnywhereTS Line 149  namespace AnywhereTS
149          }          }
150    
151          // Adds an ACL entry for RW access on the specified file for Remote desktop users.          // Adds an ACL entry for RW access on the specified file for Remote desktop users.
152            [Obsolete("GrantRWaccessForRemoteDesktopUsers has been deprecated - define user access rights via SQL Server")]
153          public static void GrantRWaccessForRemoteDesktopUsers(string fileName)          public static void GrantRWaccessForRemoteDesktopUsers(string fileName)
154          {          {
155              // Get a FileSecurity object that represents the current security settings.              // Get a FileSecurity object that represents the current security settings.
# Line 163  namespace AnywhereTS Line 165  namespace AnywhereTS
165          }          }
166    
167          // Adds an ACL entry for ReadWriteModify access on the specified file for Remote desktop users.          // Adds an ACL entry for ReadWriteModify access on the specified file for Remote desktop users.
168            [Obsolete("GrantRWMaccessForRemoteDesktopUsers has been deprecated - define user access rights via SQL Server")]
169          public static void GrantRWMaccessForRemoteDesktopUsers(string fileName)          public static void GrantRWMaccessForRemoteDesktopUsers(string fileName)
170          {          {
171              // Get a FileSecurity object that represents the current security settings.              // Get a FileSecurity object that represents the current security settings.
# Line 180  namespace AnywhereTS Line 183  namespace AnywhereTS
183    
184          // (obsolete)          // (obsolete)
185          // Adds an ACL entry for to deny modify access on the specified file for all users.          // Adds an ACL entry for to deny modify access on the specified file for all users.
186            [Obsolete("DenyAccessRightModifyForUsers has been deprecated - define user access rights via SQL Server")]
187          public static void DenyAccessRightModifyForUsers(string fileName)          public static void DenyAccessRightModifyForUsers(string fileName)
188          {          {
189              // Get a FileSecurity object that represents the current security settings.              // Get a FileSecurity object that represents the current security settings.
# Line 245  namespace AnywhereTS Line 249  namespace AnywhereTS
249                  catch (Exception e)                  catch (Exception e)
250                  {                  {
251                      MessageBox.Show("Could not update TFTP server '" + GetTftpPath(row) + "' (22181). Error: " + e.Message);                      MessageBox.Show("Could not update TFTP server '" + GetTftpPath(row) + "' (22181). Error: " + e.Message);
252                        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
253                        {
254                            using (log4net.NDC.Push(string.Format("tftpPath={0}", GetTftpPath(row))))
255                            {
256                                Logging.ATSAdminLog.Error("Could not update TFTP server");
257                            }
258                        }
259                  }                  }
260                            
261                  // Try to set rights for image the image file                  // Try to set rights for image the image file
# Line 280  namespace AnywhereTS Line 291  namespace AnywhereTS
291                  catch (Exception e)                  catch (Exception e)
292                  {                  {
293                      MessageBox.Show("Could not update TFTP server '" + GetTftpPath(row) + "' (22381). Error: " + e.Message);                      MessageBox.Show("Could not update TFTP server '" + GetTftpPath(row) + "' (22381). Error: " + e.Message);
294                        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
295                        {
296                            using (log4net.NDC.Push(string.Format("tftpPath={0}", GetTftpPath(row))))
297                            {
298                                Logging.ATSAdminLog.Error("Could not update TFTP server");
299                            }
300                        }
301                  }                  }
302              }              }
303          }          }
# Line 299  namespace AnywhereTS Line 317  namespace AnywhereTS
317                  catch (Exception ex)                  catch (Exception ex)
318                  {                  {
319                      MessageBox.Show("Cannot set access rights for client configuration. Application will abort. Error: " + ex.Message);                      MessageBox.Show("Cannot set access rights for client configuration. Application will abort. Error: " + ex.Message);
320                        using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString())))
321                        {
322                            Logging.ATSAdminLog.Error("Cannot set access rights for client configuration");
323                        }
324                      Application.Exit();                      Application.Exit();
325                      return;                      return;
326                  }                  }
# Line 361  namespace AnywhereTS Line 383  namespace AnywhereTS
383              {              {
384                  //improve autoretry                  //improve autoretry
385                  MessageBox.Show("Error: Could not write configuration data to disk. Possibly the data is being accessed by another component right now or you do not have the sufficient rights. Please retry this operation later (52044). Error details: " + e.Message);                  MessageBox.Show("Error: Could not write configuration data to disk. Possibly the data is being accessed by another component right now or you do not have the sufficient rights. Please retry this operation later (52044). Error details: " + e.Message);
386                    using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
387                    {
388                        using (log4net.NDC.Push(string.Format("path={0}", path)))
389                        {
390                            Logging.ATSAdminLog.Error("Could not write configuration data to disk");
391                        }
392                    }
393              }              }
394    
395              finally              finally

Legend:
Removed from v.16  
changed lines
  Added in v.47

  ViewVC Help
Powered by ViewVC 1.1.22