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

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.

Tweet Share WhatsApp

Answer:

E. Create the event log source in the installer class of the application.

Download MCSD.NET - 70-330 Exam PDF Read All 9 MCSD.NET - 70-330 Exam Questions
Previous QuestionNext Question
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>
Suppose You create an ASP.NET Web application
that all authenticated network users will access. The authentication mode in the Web.config file is
currently set to None. Due to recent security threats, the network administrator requires that all
connections to the application?s Web server use the network credentials of the authenticated
user. You need to configure the application to use the network credentials of the authenticated
user as HTTPContext.Current.User. Which action or actions should you perform? (Choose all that
apply)
A. Ask the network administrator to configure the IIS directory security to Anonymous
authentication.
B. Ask the network administrator to configure the IIS directory security to Integrated Windows
authentication.
C. Set the authentication mode in the Web.config file to Forms.
D. Set the authentication mode in the Web.config file to Windows.
E. Set the impersonation attribute of the identity element in the Web.config file to true.