Read without ads and support Scribd by becoming a Scribd Premium Reader.
Microsoft .NET Framework 2.0-Application Development Foundation
Question Number (ID) : 1 (536P_3.2.1_03)
________________________________________________________________________________________________________________
In the Installer class, which of the following methods is called first when installing an application?
1. OnBeforeInstall
<Correct>

2. Commit
3. OnCommitting
4. Install
5. OnBeforeRollback

Explanation :
When installing an application, methods are called in the following order: OnBeforeInstall, Install,
OnAfterInstall, OnCommiting, Commit, and finally OnCommitted.
OnBeforeRollback is called only if an error occurs during setup.
Objective:
Embedding configuration, diagnostic, management, and installation features into a .NET Framework
application
Sub Objective(s):

Create a custom Microsoft Windows Installer for the .NET Framework components by using the
System.Configuration.Install namespace, and configure the .NET Framework applications by using
configuration files, environment variables, and the .NET Framework Configuration tool
(Mscorcfg.msc).). Installer class

References :

MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework 2.0--Application Development
Foundation, Microsoft
Chapter 9 - Lesson 2

Installer Class
MSDN Library, Microsoft
Link: http://msdn2.microsoft.com/en-us/library/system.configuration.install.installer(VS.80).aspx

Microsoft .NET Framework 2.0-Application Development Foundation
Question Number (ID) : 2 (536P_5.2.2_03)
________________________________________________________________________________________________________________
Per instructions from your IT department, you need to configure your application's configuration
file with the following security settings:

* Users must be able to read, but not modify, the configuration file.
* Administrators must be able to edit the configuration file.
* An event must be added to the event log each time an administrator modifies the file.

Which of the following code samples correctly creates a FileSecurity object to meet these requirements?
1. ' VB
Dim a As NTAccount = New NTAccount("Administrators")
Dim u As NTAccount = New NTAccount("Users")

Dim ar1 As FileSystemAccessRule = New FileSystemAccessRule(a, FileSystemRights.FullControl,
AccessControlType.Allow)
Dim ar2 As FileSystemAccessRule = New FileSystemAccessRule(u, FileSystemRights.Read,
AccessControlType.Allow)
Dim ar3 As FileSystemAuditRule = New FileSystemAuditRule(a, FileSystemRights.Modify,
AuditFlags.Success)

Dim fs As FileSecurity = New FileSecurity
fs.AddAccessRule(ar1)
fs.AddAccessRule(ar2)
fs.AddAuditRule(ar3)

// C#
NTAccount a = new NTAccount("Administrators");
NTAccount u = new NTAccount("Users");

FileSystemAccessRule ar1 = new FileSystemAccessRule(a, FileSystemRights.FullControl,
AccessControlType.Allow);
FileSystemAccessRule ar2 = new FileSystemAccessRule(u, FileSystemRights.Read,
AccessControlType.Allow);
FileSystemAuditRule ar3 = new FileSystemAuditRule(a, FileSystemRights.Modify, AuditFlags.Success);

FileSecurity fs = new FileSecurity();
fs.AddAccessRule(ar1);
fs.AddAccessRule(ar2);
fs.AddAuditRule(ar3);

<Correct>
2. ' VB
Dim a As NTAccount = New NTAccount("Administrators")
Dim u As NTAccount = New NTAccount("Users")

Dim ar1 As FileSystemAuditRule = New FileSystemAuditRule(a, FileSystemRights.FullControl,
AccessControlType.Allow)
Dim ar2 As FileSystemAuditRule = New FileSystemAuditRule(u, FileSystemRights.Read,
AccessControlType.Allow)
Dim ar3 As FileSystemAuditRule = New FileSystemAuditRule(a, FileSystemRights.Modify,
AuditFlags.Success)

Dim fs As FileSecurity = New FileSecurity
fs.AddAuditRule(ar1)
fs.AddAuditRule(ar2)
fs.AddAuditRule(ar3)

// C#
NTAccount a = new NTAccount("Administrators");
NTAccount u = new NTAccount("Users");

FileSystemAuditRule ar1 = new FileSystemAuditRule(a, FileSystemRights.FullControl,
AccessControlType.Allow);
FileSystemAuditRule ar2 = new FileSystemAuditRule(u, FileSystemRights.Read, AccessControlType.Allow);
FileSystemAuditRule ar3 = new FileSystemAuditRule(a, FileSystemRights.Modify, AuditFlags.Success);

FileSecurity fs = new FileSecurity();
fs.AddAuditRule(ar1);
fs.AddAuditRule(ar2);
fs.AddAuditRule(ar3);
3. ' VB
Dim a As NTAccount = New NTAccount("Administrators")
Dim u As NTAccount = New NTAccount("Users")

Dim ar1 As FileSystemAccessRule = New FileSystemAccessRule(a, FileSystemRights.FullControl,
AccessControlType.Allow)
Dim ar2 As FileSystemAccessRule = New FileSystemAccessRule(u, FileSystemRights.Read,
AccessControlType.Allow)
Dim ar3 As FileSystemAccessRule = New FileSystemAccessRule(a, FileSystemRights.Modify,
AuditFlags.Success)

Dim fs As FileSecurity = New FileSecurity
fs.AddAccessRule(ar1)
fs.AddAccessRule(ar2)
fs.AddAccessRule(ar3)

// C#
NTAccount a = new NTAccount("Administrators");
NTAccount u = new NTAccount("Users");

FileSystemAccessRule ar1 = new FileSystemAccessRule(a, FileSystemRights.FullControl,
AccessControlType.Allow);
FileSystemAccessRule ar2 = new FileSystemAccessRule(u, FileSystemRights.Read,
AccessControlType.Allow);
FileSystemAccessRule ar3 = new FileSystemAuditRule(a, FileSystemRights.Modify, AuditFlags.Success);

FileSecurity fs = new FileSecurity();
fs.AddAccessRule(ar1);
fs.AddAccessRule(ar2);
fs.AddAccessRule(ar3);

4. ' VB
Dim a As NTAccount = New NTAccount("Administrators")
Dim u As NTAccount = New NTAccount("Users")

Dim ar1 As FileSystemAccessRule = New FileSystemAccessRule(a, FileSystemRights.FullControl,
AccessControlType.Allow)
Dim ar2 As FileSystemAccessRule = New FileSystemAccessRule(u, FileSystemRights.Read,
AccessControlType.Allow)
Dim ar3 As FileSystemAuditRule = New FileSystemAuditRule(a, FileSystemRights.Modify,
AuditFlags.Success)

Dim fs As FileSecurity = New FileSecurity
fs.AddAuditRule(ar1)
fs.AddAuditRule(ar2)
fs.AddAccessRule(ar3)

// C#
NTAccount a = new NTAccount("Administrators");
NTAccount u = new NTAccount("Users");

FileSystemAccessRule ar1 = new FileSystemAccessRule(a, FileSystemRights.FullControl,
AccessControlType.Allow);
FileSystemAccessRule ar2 = new FileSystemAccessRule(u, FileSystemRights.Read,
AccessControlType.Allow);
FileSystemAuditRule ar3 = new FileSystemAuditRule(a, FileSystemRights.Modify, AuditFlags.Success);

FileSecurity fs = new FileSecurity();
fs.AddAuditRule(ar1);
fs.AddAuditRule(ar2);
fs.AddAccessRule(ar3);

Explanation :

You need to create two instances of FileSystemAccessRule to create the Discrectionary Access Control
Lists (DACLs) for Administrators and Users, and one instance of FileSystemAuditRule to create the
System Access Control List (SACL) for Administrators.

You cannot create an instance of FileSystemAccessRule to enable auditing. You must use
FileSystemAuditRule.
You must call FileSecurity.AddAccessRule to add instances of type FileSystemAccessRule, and
FileSecurity.AddAuditRule to add instances of type FileSystemAuditRule.
Objective:
Improving the security of the .NET Framework applications by using the .NET Framework 2.0 security
features
Search History:
Searching...
Result 00 of 00
00 results for result for
  • p.
  • Notes
    Load more