Which code segment should you use?
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. The application contains the following code segment.
Dim SQL As String = String.Format(
“SELECT * FROM Customer WHERE CompanyName LIKE ‘%{0}%'”,
companyName)
Dim cmd = New SqlCommand(SQL, con)
You need to reduce the vulnerability to SQL injection attacks. Which code segment should you use?
What should you recommend?
You are designing a Windows Presentation Foundation (WPF) client application from which
employees will access a Web service. Business partners will access the Web service by
using proprietary client applications. You need to recommend a solution for ensuring the
integrity of data in the system. What should you recommend?
Which type of element should you use?
You create a Feature. You need to add an item to the context menu of a list. Which type of
element should you use?
What should you recommend?
You are designing a .NET Framework 4 solution that includes a Windows Presentation
Foundation (WPF) application. The WPF application connects to a Microsoft SQL Server
2008 database. You plan to deploy the WPF application to millions of client computers. The
SQL Server database will be hosted in a data center. The WPF application will query the
database to provide type-ahead assistance as users enter data. The WPF application will
send a query after each character is entered. Each query will access multiple joined tables.
You need to recommend an approach for maximizing scalability of the solution. What should
you recommend?
You need to replicate the metadata from Server1 to Server2
Your network contains two separate subnets named Subnet1 and Subnet2. Subnet1 contains a
Windows Server Update Services (WSUS) server named Server1. Computers on Subnet1 can access
resources on the Internet. Subnet2 is an isolated subnet. You deploy a new WSUS server named
Server2 in Subnet2. You need to replicate the metadata from Server1 to Server2. What should you
do on Server1?
You need to ensure that the application can add new Customer entities
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application uses the ADO.NET Entity Framework to model entities. The application includes a
Customer entity along with a CustomerKey property of the Guid type as shown in the following
exhibit.
You discover that when the application adds a new instance of a Customer, calling the SaveChanges
method results in the following error message:
“Server generated keys are only supported for identity columns.”
You need to ensure that the application can add new Customer entities.
What should you do?
Which approach should you recommend?
You have a Web application that has been migrated from ASP.NET 3.5 to ASP.NET 4.
While testing the migrated Web application, developers notice that the non-input Web
controls with the property Enabled=”false” are rendering as enabled. You need to ensure
that the controls in the migrated Web application render correctly, and that other Web
applications hosted on the same Web server are not affected by the solution. Which
approach should you recommend?
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?
What should you add to the connection string?
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database by using SQL Server authentication.
The application contains the following connection string.
SERVER=DBSERVER-01; DATABASE=pubs; uid=sa; pwd=secret;
You need to ensure that the password value in the connection string property of a SqlConnection
object does not exist after the Open method is called. What should you add to the connection
string?
What should you recommend?
You are reviewing multiple Windows Presentation Foundation (WPF) applications that
capture postal addresses. The WPF applications have different appearances and
functionality. Each WPF application uses a different control to visualize the captured
addresses. You plan to modify all WPF applications to allow developers to visualize
addresses by using a common template. You need to recommend an approach for
standardizing the visualization of captured addresses. What should you recommend?