Microsoft 70-564 Real Exam Questions
Pro: Designing and Developing ASP.NET Applications Using the Microsoft .NET Framework 3.5
This exam is designed to test the candidates knowledge and skills at designing and developing ASP.NET applications using Visual Studio 2008 and the Microsoft .NET Framework 3.5.
Questions that contain code will be presented in either VB or C#. Candidates can select one of these languages when they start the exam.
1: You are creating an ASP.NET application by using the .NET Framework 3.5. The application must access a Microsoft SQL Server 2008 database. The database and the ASP.NET application are located on two different servers. The two servers are located on networks separated by a firewall. Only port 80 and port 443 are open through the firewall. You need to ensure that the application can access the database. What should you do?
A.Perform all database access by using stored procedures.
B.Create a SQL client alias on the Web server.
C.Create a Web service and deploy it to the same network as the Web server.
D.Create a Web service and deploy it to the same network as the database server.
Correct Answers: D
2: You are creating ASP.NET applications by using the .NET Framework 3.5. The application has two tables named Products and ProductPrice. The application retrieves and stores data from the Product table into a Dataset object. The application uses the DataSet object to modify and update the data that is retrieved. The update command for the related SqlDataAdapter class is generated automatically by using a SqlCommandBuilder object. You plan to retrieve and modify data from the Product and ProductPrice tables as a unit. You need to ensure that the application can update the data in the tables. What should you do?
A.Call the SqlCommandBuilder.RefreshSchema() method before calling the Update() method of the SqlDataAdapter class.
B.Call the SqlCommandBuilder.GetUpdateCommand() method before calling the Update() method of the SqlDataAdapter class.
C.Set the UpdateCommand property of the SqlDataAdapter class to a SqlCommand object. Use a custom UPDATE statement and call the Update method of the SqlDataAdapter class.
D.Set the DataAdapter property of the SqlCommandBuilder class to the SqlDataAdapter object. Use a custom UPDATE statement and call the Update method of the SqlDataAdapter class.
Correct Answers: C
3: You are creating ASP.NET applications by using the .NET Framework 3.5.
You plan to create a component that retrieves data from a Microsoft SQL Server database, a Microsoft Access database, or a variety of third-party databases.
The component must meet the following requirements:
Use minimum memory.
Prevent data from being updated or deleted.
Provide access to individual records as quickly as possible.
You need to design a data access strategy to meet the requirements.
Which data tier object should you use?
A.SqlDataReader
B.OleDbDataReader
C.OracleDataReader
D.AccessDataSource
Correct Answers: B
4: You are creating an ASP.NET application by using the .NET Framework 3.5.
The application will contain a Data Access Layer (DAL) that will support databases from third-party vendors. The application will display data by using a GridView control.
You need to ensure that the application meets the following requirements:
Allow paging
Provide optimistic concurrency
Which data access object should you use in the DAL?
A.SqlDataReader
B.SqlDataAdapter
C.OleDbDataReader
D.OleDbDataAdapter
Correct Answers: D
5: You are creating an ASP.NET application by using the .NET Framework 3.5.
The application has the following components:
A user interface (UI)
Web services
A Microsoft SQL Server 2008 database
The application communicates with the Web services to access data. The Web services and database are hosted on the same server.
The database server is moved to a remote location. The remote location is connected via a high-speed WAN network.
A firewall between the database and the ASP.NET application prevents access to all ports except port 80 and port 443.
You need to ensure the application maintains as secure a communication possible with the Web services.
What should you do?
A.Expose the Web services by using the Secure Sockets Layer (SSL) on port 443.
B.Expose the Web Services by using HTTP. Disable anonymous access and use Basic authentication.
C.Expose the Web Services by using HTTP on port 80. Use IP filtering to restrict calls to the Web service.
D.Convert the Web services to WCF services. Expose the WCF services by using the NetNamedPipeBinding class.
Correct Answers: A
6: You are creating ASP.NET applications by using the .NET Framework 3.5.
You plan to display data from a Microsoft SQL Server 2005 database.
You write the following stored procedure. (Line numbers are included for reference only.)
01 CREATE PROCEDURE GetEventHistory
02 AS
03 SELECT HistoryID, EventName, EventDescription
04 FROM EVENTHistory FOR XML AUTO
You need to ensure that the Web page design meets the following requirements:
Each row from the database is displayed on a separate row on the Web page.
The result is displayed in a GridView control.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.Use LINQ to XML to retrieve data for the GridView control.
B.Use the SqlDataSource control to retrieve data for the GridView control.
C.Use the XmlDataSource control to retrieve data for the GridView control.
D.Modify line 04 of the stored procedure in the following manner. FROM EVENTHistory
E.Modify line 04 of the stored procedure in the following manner. FROM EVENTHistory FOR XML AUTO, ROOT(‘XML’)
Correct Answers: B D
7: You are creating an ASP.NET application by using Microsoft .NET Framework 3.5.
The application is a library application that catalogs subjects and books. The application contains a DataContext object named Subjects and a related line of business object named Books.
The Subjects DataContext object is queried by using the following LINQ query.
Dim query = _
From subject In Subjects _
Where (subject.Books.All(Function(b) b.Price <= 25)) _
Select subject
You need to find out the results that will be returned from the query.
What is the result of the query?
A.All books that have a price less than or equal to 25
B.All books that have a price greater than or equal to 25
C.All subjects that have the price of the related book less than or equal to 25
D.All subjects that have the price of the related book greater than or equal to 25
Correct Answers: C
8: You are creating an ASP.NET application by using the .NET Framework 3.5.
You use LINQ to SQL to query a SQL Server database. You need to create a LINQ query to retrieve information on order and order details.
You need to ensure that the LINQ query executes the following SQL statement:
SELECT Order.OrderID
,Order.Description
,OrderDetails.UnitPrice
FROM Order JOIN OrderDetails
ON Order.OrderID = OrderDetails.OrderID
Which LINQ query should you use?
A.From order In db.Orders _Join details In db.OrderDetails On _order.OrderID Equals details.OrderID _Select _ order.OrderID, _ order.Description, _ details.UnitPrice
B.From order In db.Orders _Group Join details In db.OrderDetails On _order.OrderID Equals details.OrderID Into grp = Group _From ord In grp.DefaultIfEmpty() _Select _ order.OrderID, _ order.Description, _ ord.UnitPrice
C.From order In db.Orders _Group Join details In db.OrderDetails On _order.OrderID Equals details.OrderID Into grp = Group _Select _ order.OrderID, _ order.Description, _ grp.First().UnitPrice
D.From order In db.Orders _Group Join details In db.OrderDetails On _order.OrderID Equals details.OrderID Into grp = Group _Let price = grp.DefaultIfEmpty().First() _Select _ order.OrderID, _ order.Description, _ price.UnitPrice
Correct Answers: A
9: You are creating ASP.NET applications by using the .NET Framework 3.5.
You plan to evaluate an application design that has the following specifications:
Data is stored in a Microsoft SQL Server 2008 database.
Data is retrieved by using a DataContext object.
Data is displayed by using GridView controls.
You need to choose an appropriate data source control that can be used in the design of the application.
Which data source control should you use?
A.SqlDataSource
B.XmlDataSource
C.LinqDataSource
D.ObjectDataSource
Correct Answers: C
10: You are creating ASP.NET applications by using the .NET Framework 3.5. You design a Web application that uses Forms-based authentication. The application provides interactive content to authenticated users, and premium content to subscribers. The application contains a subdirectory named Premium. By default, all authenticated users are assigned the Siteuser role. Users who pay a subscription fee are assigned to the Subscriber role. You need to ensure that only those users who are assigned to the Subscriber role can access the Premium subdirectory. What should you do?
A.In the Premium subdirectory, add the following code fragment to the Web.config file. <deny users="Siteuser" />
B.In the Premium subdirectory, add the following code fragment to the Web.config file. <allow roles="Subscriber" /><deny users="*" />
C.In the Premium subdirectory, add the following code fragment to the Web.config file. <deny users="*" /><allow roles="Subscriber" />
D.In the application root directory, add the following code fragment to the Web.config file. <allow user="Siteuser; Premium\Subscriber" />
Correct Answers: B
Download | Password: certificatexam.com