Microsoft UPG:Transition MCPD.NET Frmwrk 3.5 Web Dev to 4 Web Dev - 70-523 Exam Practice Test
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 allows users to make
changes to entities while disconnected from the central data store.
You need to ensure that when the user connects to the central data store and retrieves new data, the
application meets the following requirements:
*Changes made to the local data store in disconnected mode are preserved.
*Entities that have already been loaded into the local data store, but have not been modified by the user,
are updated with the latest data.
What should you do?
application uses the ADO.NET Entity Framework to model entities. The application allows users to make
changes to entities while disconnected from the central data store.
You need to ensure that when the user connects to the central data store and retrieves new data, the
application meets the following requirements:
*Changes made to the local data store in disconnected mode are preserved.
*Entities that have already been loaded into the local data store, but have not been modified by the user,
are updated with the latest data.
What should you do?
Correct Answer: C
Vote an answer
Windows Communication Foundation (WCF) application uses a data contract that has several data members. You need the application to throw a Serialization Exception if any of the data members are not present when a serialized instance of the data contract is deserialized. What should you do?
Correct Answer: D
Vote an answer
You need to design a solution for programmatically adding reusable user-interface code to views and allowing the user-interface code to be rendered from the server side. Which approach should you recommend
Correct Answer: A
Vote an answer
You are implementing an ASP.NET AJAX page. You add two UpdatePanel controls named pnlA and pnlB.
pnlA contains an UpdatePanel control named pnlAInner in its content template.
You have the following requirements.
?Update panels pnlA and pnlB must refresh their content only when controls that they contain cause a
postback.
?Update panel pnlAInner must refresh its content when controls in either pnlA or pnlB or pnlAInner cause a
postback.
You need to configure the panels to meet the requirements.
What should you do?
pnlA contains an UpdatePanel control named pnlAInner in its content template.
You have the following requirements.
?Update panels pnlA and pnlB must refresh their content only when controls that they contain cause a
postback.
?Update panel pnlAInner must refresh its content when controls in either pnlA or pnlB or pnlAInner cause a
postback.
You need to configure the panels to meet the requirements.
What should you do?
Correct Answer: A
Vote an answer
You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer. You need to expose the following class as a service named Arithmetic with an operation named Sum. public class Calculator {
public int Add(int x, int y)
{
}
}
Which code segment should you use?
public int Add(int x, int y)
{
}
}
Which code segment should you use?
Correct Answer: B
Vote an answer
You are designing an ASP.NET Web application that displays daily sales information. The sales
information is stored in a large Microsoft SQL Server database. The database information is updated each
night. During the day, people use the Web application to display a set of standard sales reports based on
the latest database information.
The SQL queries that are required to retrieve the database information can take from 20 to 30 seconds to
execute.
You need to design the application to ensure that pages usually load in no more than 5 seconds.
Which two approaches could you recommend? (Each correct answer presents a complete solution.
Choose two.)
information is stored in a large Microsoft SQL Server database. The database information is updated each
night. During the day, people use the Web application to display a set of standard sales reports based on
the latest database information.
The SQL queries that are required to retrieve the database information can take from 20 to 30 seconds to
execute.
You need to design the application to ensure that pages usually load in no more than 5 seconds.
Which two approaches could you recommend? (Each correct answer presents a complete solution.
Choose two.)
Correct Answer: A,C
Vote an answer
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. 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.)
01using (SqlConnection connection = new SqlConnection(cnnStr)) {
02connection.Open();
03SqlTransaction sqlTran = connection.BeginTransaction();
04SqlCommand command = connection.CreateCommand();
05command.Transaction = sqlTran;
06try {
07command.CommandText = "INSERT INTO Production.ScrapReason(Name) VALUES('Wrong size')";
08command.ExecuteNonQuery();
09command.CommandText = "INSERT INTO Production.ScrapReason(Name) VALUES('Wrong color')";
10command.ExecuteNonQuery();
11
12}
You need to log error information if the transaction fails to commit or roll back.
Which code segment should you insert at line 11?
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.)
01using (SqlConnection connection = new SqlConnection(cnnStr)) {
02connection.Open();
03SqlTransaction sqlTran = connection.BeginTransaction();
04SqlCommand command = connection.CreateCommand();
05command.Transaction = sqlTran;
06try {
07command.CommandText = "INSERT INTO Production.ScrapReason(Name) VALUES('Wrong size')";
08command.ExecuteNonQuery();
09command.CommandText = "INSERT INTO Production.ScrapReason(Name) VALUES('Wrong color')";
10command.ExecuteNonQuery();
11
12}
You need to log error information if the transaction fails to commit or roll back.
Which code segment should you insert at line 11?
Correct Answer: B
Vote an answer
You need to recommend appropriate technologies for designing Web forms for entry and retrieval of news
items.
Which technologies should you recommend? (Each correct answer presents a complete solution. Choose
two.)
items.
Which technologies should you recommend? (Each correct answer presents a complete solution. Choose
two.)
Correct Answer: A,D
Vote an answer
A WCF service code is implemented as follows. (Line numbers are included for reference only.)
For interactive and self-paced preparation of exam 70-513, try our practice exams.
Practice exams also include self assessment and reporting features!
01 <ServiceContract()>
02 <ServiceBehavior(
03InstanceContextMode:=InstanceContextMode.Single)>
04Public Class CalculatorService
05
06 <OperationContract()>
07Public Function Calculate(ByVal op1 As Double,
08ByVal op As String, ByVal op2 As Double) As Double
...
24End Function
25
26End Class
You need to increase the rate by which clients get the required response from the service.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.
Choose two.)
For interactive and self-paced preparation of exam 70-513, try our practice exams.
Practice exams also include self assessment and reporting features!
01 <ServiceContract()>
02 <ServiceBehavior(
03InstanceContextMode:=InstanceContextMode.Single)>
04Public Class CalculatorService
05
06 <OperationContract()>
07Public Function Calculate(ByVal op1 As Double,
08ByVal op As String, ByVal op2 As Double) As Double
...
24End Function
25
26End Class
You need to increase the rate by which clients get the required response from the service.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.
Choose two.)
Correct Answer: A,B
Vote an answer