Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
157Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
MCTS 70-536 Questions

MCTS 70-536 Questions

Ratings: (0)|Views: 2,968 |Likes:
Published by JUNKI8957

More info:

Published by: JUNKI8957 on Dec 20, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/06/2012

pdf

text

original

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

Activity (157)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Guillermo Guille liked this
Amit Kumar Barik liked this
Vitty Frank liked this
Joao Paulo liked this
Vinod Kumar liked this
Ted Gooch liked this
Bogdan Țibuleac liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->