Which code segment should you use?
You have a SharePoint site that has the URL http://contoso.com/hr. You are creating a new Web
Part. You need to create a reference to the current subsite without having to dispose of any
returned objects. Which code segment should you use?
Which tier should you recommend?
You are designing an n-tier .NET Framework 4 solution that includes a Windows
Presentation Foundation (WPF) application and a Windows Workflow Foundation (WF)
component. The WF component contains functionality to incorporate frequently changing
rules. You need to recommend a tier for the deployment of the WF component that will not
degrade the performance of the WPF application. Which tier should you recommend?
Which code segment should you insert at line 10?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
use the ADO.NET Entity Framework to model entities. The application connects to a Microsoft SQL
Server database named AdventureWorks. The application includes the following code segment. (Line
numbers are included for reference only.)
01 Using context As New AdventureWorksEntities()
02 Dim orders As ObjectQuery(Of SalesOrderHeader) =
03 context.SalesOrderHeader.Where(“it.CreditCardApprovalCode IS NULL”).Top(“100”)
04 For Each order As SalesOrderHeader In orders
05 order.Status = 4
06 Next
07 Try
08 context.SaveChanges()
09 Catch generatedExceptionName As OptimisticConcurrencyException
10
11 End Try
12 End Using
You need to resolve any concurrency conflict that can occur. You also need to ensure that local
changes are persisted to the database. Which code segment should you insert at line 10?
You need to ensure that the correct authentication header is present when requests are made by using MyDataSer
You use Microsoft .NET Framework 4 to develop an application that uses WCF Data Services to
retrieve entities. WCF Data Services uses an authentication scheme that requires an HTTP request
that has the following header format.
GET /OData.svc/Products(1)
Authorization: WRAP access_token=”123456789″
The application includes the following code. (Line numbers are included for reference only.)
01 Public Class Program
02
03 Public Sub GetProducts()
04
05 Dim proxy = New MyDataServiceContext()
06
07
08 End Sub
09
10 End Class
You need to ensure that the correct authentication header is present when requests are made by
using MyDataServiceContext. What should you do?
Which testing methodology should you recommend?
You are designing a Windows Presentation Foundation (WPF) application that uses .NET
Framework 4. The WPF application will be deployed to 5,000 users worldwide. You need to
recommend an approach for identifying problems that users will experience. Which testing
methodology should you recommend?
What should you recommend?
You are designing an ASP.NET Web application. Each page of the Web application will
have a common master page and derive from a common base page class. You have the
following requirements: Support multiple languages for user interface labels. Enable
automatic detection of language based on browser language settings. You need to
recommend an approach to support localization. What should you recommend?
What should you configure?
You have a SharePoint site that contains 10 lists. You need to prevent a list named List1 from
appearing on the Quick Launch navigation bar. What should you configure?
You need to ensure that NAP policies are enforced on portable computers that use a wireless connection to acce
Your company has Active Directory Certificate Services (AD CS) and Network Access Protection (NAP)
deployed on the network. You need to ensure that NAP policies are enforced on portable computers
that use a wireless connection to access the network. What should you do?
Which code segment should you insert at line 09?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You
create a Database Access Layer (DAL) that is database-independent.
The DAL includes the following code segment. (Line numbers are included for reference only.)
01 Shared Sub ExecuteDbCommand(connection As DbConnection)
02 If connection <> Nothing Then
03 Using connection
04 Try
05 connection.Open()
06 Dim command As DbCommand = connection.CreateCommand()
07 command.CommandText = “INSERT INTO Categories (CategoryName) VALUES (‘Low Carb’)”
08 command.ExecuteNonQuery()
09
10 Catch ex As Exception
11 Trace.WriteLine(“Exception.Message: ” + ex.Message)
12 End Try
13 End Using
14 End If
15 End Sub
You need to log information about any error that occurs during data access. You also need to log the
data provider that accesses the database. Which code segment should you insert at line 09?
Which approach should you recommend?
You are designing a SharePoint 2010 application that creates a content type. You need to
design the application so that users are not able to change the content type from within the
SharePoint 2010 user interface. Which approach should you recommend?