148 |
} |
} |
149 |
|
|
150 |
// 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. |
151 |
|
[Obsolete("GrantRWaccessForRemoteDesktopUsers has been deprecated - define user access rights via SQL Server")] |
152 |
public static void GrantRWaccessForRemoteDesktopUsers(string fileName) |
public static void GrantRWaccessForRemoteDesktopUsers(string fileName) |
153 |
{ |
{ |
154 |
// Get a FileSecurity object that represents the current security settings. |
// Get a FileSecurity object that represents the current security settings. |
164 |
} |
} |
165 |
|
|
166 |
// 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. |
167 |
|
[Obsolete("GrantRWMaccessForRemoteDesktopUsers has been deprecated - define user access rights via SQL Server")] |
168 |
public static void GrantRWMaccessForRemoteDesktopUsers(string fileName) |
public static void GrantRWMaccessForRemoteDesktopUsers(string fileName) |
169 |
{ |
{ |
170 |
// Get a FileSecurity object that represents the current security settings. |
// Get a FileSecurity object that represents the current security settings. |
182 |
|
|
183 |
// (obsolete) |
// (obsolete) |
184 |
// 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. |
185 |
|
[Obsolete("DenyAccessRightModifyForUsers has been deprecated - define user access rights via SQL Server")] |
186 |
public static void DenyAccessRightModifyForUsers(string fileName) |
public static void DenyAccessRightModifyForUsers(string fileName) |
187 |
{ |
{ |
188 |
// Get a FileSecurity object that represents the current security settings. |
// Get a FileSecurity object that represents the current security settings. |
248 |
catch (Exception e) |
catch (Exception e) |
249 |
{ |
{ |
250 |
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); |
251 |
|
using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString()))) |
252 |
|
{ |
253 |
|
using (log4net.NDC.Push(string.Format("tftpPath={0}", GetTftpPath(row)))) |
254 |
|
{ |
255 |
|
Logging.ATSAdminLog.Error("Could not update TFTP server"); |
256 |
|
} |
257 |
|
} |
258 |
} |
} |
259 |
|
|
260 |
// Try to set rights for image the image file |
// Try to set rights for image the image file |
290 |
catch (Exception e) |
catch (Exception e) |
291 |
{ |
{ |
292 |
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); |
293 |
|
using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString()))) |
294 |
|
{ |
295 |
|
using (log4net.NDC.Push(string.Format("tftpPath={0}", GetTftpPath(row)))) |
296 |
|
{ |
297 |
|
Logging.ATSAdminLog.Error("Could not update TFTP server"); |
298 |
|
} |
299 |
|
} |
300 |
} |
} |
301 |
} |
} |
302 |
} |
} |
316 |
catch (Exception ex) |
catch (Exception ex) |
317 |
{ |
{ |
318 |
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); |
319 |
|
using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", ex.Message, System.Environment.NewLine, ex.ToString()))) |
320 |
|
{ |
321 |
|
Logging.ATSAdminLog.Error("Cannot set access rights for client configuration"); |
322 |
|
} |
323 |
Application.Exit(); |
Application.Exit(); |
324 |
return; |
return; |
325 |
} |
} |
382 |
{ |
{ |
383 |
//improve autoretry |
//improve autoretry |
384 |
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); |
385 |
|
using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString()))) |
386 |
|
{ |
387 |
|
using (log4net.NDC.Push(string.Format("path={0}", path))) |
388 |
|
{ |
389 |
|
Logging.ATSAdminLog.Error("Could not write configuration data to disk"); |
390 |
|
} |
391 |
|
} |
392 |
} |
} |
393 |
|
|
394 |
finally |
finally |