Which server role, role service, or feature should you install?
Your network contains an Active Directory forest. The forest contains a member server named
Server1 that runs Windows Server 2008 R2. You need to configure Server1 as a network address
translation (NAT) server. Which server role, role service, or feature should you install?
You need to retrieve all of the results from the stored procedure
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. You add the following stored procedure to the database.
CREATE PROCEDURE GetSalesPeople
AS
BEGIN
SELECT FirstName, LastName, Suffix, Email, Phone
FROM SalesPeople
END
You write the following code. (Line numbers are included for reference only.)
01 Dim connection As SqlConnection = New SqlConnection(“& “)
02 Dim command As SqlCommand = New SqlCommand(“GetSalesPeople”, connection)
03 command.CommandType = CommandType.StoredProcedure
04
You need to retrieve all of the results from the stored procedure. Which code segment should you
insert at line 04
Which URL should you use?
You create a custom list named Products. You need to perform a Representational State Transfer
(REST) query that returns products 30 to 39. Which URL should you use?
What should you recommend?
You are designing a Windows Presentation Foundation (WPF) data entry application. The
application uses data binding to bind controls in the user interface (UI) to business objects.
The UI uses validation rules for each input control. The data validation rules change based
on the state of the business object. You need to recommend a validation strategy that will
allow changes to the validation rules without changes to the UI code. What should you
recommend?
What should you recommend?
You are designing an ASP.NET Web application. The Web application must allow users to
authenticate by using LDAP on a Web form. You need to recommend an authentication
model. What should you recommend?
Which code segment should you insert at line 04?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. The application uses the following object
query to load a product from the database. (Line numbers are included for reference only.)
01 Using advWorksContext As New AdventureWorksEntities()
02 Dim productQuery As ObjectQuery(Of Product) =
03 advWorksContext.Product.Where(“it.ProductID = 900”)
04
05 End Using
You need to log the command that the query executes against the data source. Which code segment
should you insert at line 04?
You need to ensure that the actual exception data is provided to client computers
You use Microsoft Visual Studio 2010 and Microsoft NET Framework 4 to create an application. You
deploy a Windows Communication Foundation (WCF) Data Service to a production server. The
application is hosted by Internet Information Services (US). After deployment applications that
connect to the service receive the following error message. The server encountered an error
processing the request. See server logs for more details. You need to ensure that the actual
exception data is provided to client computers. What should you do?
You need to ensure that the COM components can be replaced without impacting the existing user interface (UI)
You are designing an n-tier Windows application by using Microsoft .NET Framework 4,
Microsoft Visual Studio 2010, and Microsoft SQL Server 2008. The application will replace
an existing client/server application. The existing application was created by using Microsoft
Visual Basic 6.0 and consists of a series of COM components that access a SQL Server
database. You plan to move the existing COM components into a Windows Communication
Foundation (WCF) tier. You need to ensure that the COM components can be replaced
without impacting the existing user interface (UI) tier. You also need to ensure that the COM
components can be replaced separately. What should you do?
Which code segment should you insert line 11?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an app1ication. The
application connects to a Microsoft SQL Server database. You write the following code segment that
executes two commands against the database within a transaction. (Line numbers are included for
reference only)
01 Using connection As New SqlConnection(cnnStr)
02 connnectionOpen()
03 Dim sqlTran As SqlTransaction = connection.BeginTraraction()
04 Din command As Sqlcommand = connection Createcommand()
05 commandTransation = sqlTran
06 Try
07 command.CommandText = “INSERT INTO Production.ScrapReason(Name)
VALUES(‘Wrong size’)”
08 command.ExecuteNonQuery()
09 command.CommandText = “INSERT INTO Production ScrapReason(Name)
VALIES(’Wrong color’)”
10 command.ExecuteNonQuery()
11
12 End Using
You need to log error information if the transaction fails to commit or roll back. Which code segment
should you insert line 11?
Which line of code should you identify?
You are creating a Web Part for SharePoint Server 2010. The Web Part contains the following
code segment. (Line numbers are included for reference only.) 01 protected override void
CreateChildControls () 02 { 03 base.CreateChildControls (); 04
SPSecurity.FunWithElevatedPrivileges ( 05 delegate 06 { 07 Label ListCount = new Label (); 08
ListCount.Text = String.Format (“There are {0> Lists”, SPContext.Current.Heb.Lists.Count ); 09
Controls.Add ( ListCount ) ; 10 }} 11 } You need to identify which line of code prevents the Web
Part from being deployed as a sandboxed solution. Which line of code should you identify?