MCSD.NET - 70-330 Exam Question:
Download Questions PDF

Suppose You are
developing an ASP.NET Web application that users in the accounting department will use to
process payroll reports and view payroll reports. The application will use Integrated Windows
authentication to authenticate all users. Because payroll data is confidential only users in the
accounting department will be granted access to the application. All employees in the accounting
department belong to a specific Active Directory group. However, users in the IT department can
add themselves to various Active Directory groups in order to troubleshoot resource access
problems. These IT department users must not be granted access to the ASP.NET Web
application. The following rules can be used to distinguish between users in the accounting
department and users in the IT department:
? All users in the accounting department are members of a group named CompanyAccounting.
? Some users in the IT department are members of the CompanyAccounting group.
All users in the IT department are members of a group named CompanyDomain Admin.
?
? No users in the accounting department are members of the CompanyDomain Admin group.
You need to configure URL authorization for the application by adding an <authorization>
element to the Web.config file in the application root. Which element should you use?
A. <authorization>
<deny roles=?CompanyDomain Admin?/>
<allow roles=?CompanyAccounting?/>
<deny users=?*?/>
</authorization>
B. <authorization>
<allow roles=?CompanyAccounting?/>
<deny roles=?CompanyDomain Admin?/>
<dent users=???/>
<authorization>
C. <authorization>
<deny roles=?Domain Admin?/>
<allow roles=?Accounting?/>
<deny users=?*?/>
</authorization>
D. <authorization>
<allow roles=?Accounting?/>
<deny roles=?Domain Admin?/>
<deny users=???/>
</authorization>

Answer:

A. <authorization>
<deny roles=?CompanyDomain Admin?/>
<allow roles=?CompanyAccounting?/>
<deny users=?*?/>
</authorization>

Download MCSD.NET - 70-330 Exam Interview Questions And Answers PDF

Previous QuestionNext Question
Suppose You are an application developer for Company.com. You are developing an application that can
be extended by using custom components. The application uses reflection to dynamically load
and invoke these custom components. In some cases, custom components will originate from a
source that is not fully trusted, such as the Internet.
You need to programmatically restrict the code access security policy under which custom
components run so that custom components do not run with an elevated permission grant.
What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two)
A. Create a new application domain and set the security policy level. Run custom components in
this application domain.
B. Use permission class operations to modify the security policy.
C. Implement custom permission classes to protect custom component resources.
D. Programmatically modify the machine-level security policy file after loading a custom
component.
Suppose You develop an ASP.NET Web application
that writes to an event log named EventLog1. All managers in Company will run this application.
During a exam on a manager?s client computer, the application fails in the following code
segment. (Line numbers are includes for reference only.)
1. Dim EventLog1 As New EventLog
2. If Not EventLog.SourceExists(?CompanyWebApp?) Then
3. EventLog.CreateEventSource(?CompanyWebApp?, ?Application?)
4. End If
5. EventLog1.Source = ?CompanyWebApp?
6. EventLog1.WriteEntry(?The event occurred.?)
You need to ensure that event data is written to EventLog1. You want to achieve this goal without
granting unnecessary permissions.
What should you do?
A. Insert the following code into the application.
Dim eventLogDir As String
eventLogDir = ?C:%windir?system32configAppEvent.Evt?
Dim FilePermission As _
New FileOPermission(FileIOPermissionAccess.AllAcces, eventLogDir)
FilePermission.Assert()
B. Replace line 6 of the code segment with the following line of code.
EventLog1.WriteEntry(?The event occurred?,?EventLogWriter?)
C. Grant the managers the Full Control permission for the event log file.
D. Add the aspnet_wp account to the Administrators group.
E. Create the event log source in the installer class of the application.