Top Banner
Exam : Microsoft 70-564 Title : Update : Feb-18-2009 PRO: Designing and Developing ASP.NET Applications using Microsoft .NET Framework 3.5
84
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 50092727-70-564-P1 (KOTest, 184 frågor)

Exam : Microsoft 70-564

Title :

Update : Feb-18-2009

PRO: Designing and Developing

ASP.NET Applications using

Microsoft .NET Framework 3.5

Page 2: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 2 - Test Information Co., Ltd. All rights reserved.

1. How many years of experience do you have in developing web-based appplications by using

ASP.NET technologies in .NET Framework 3.5?

A. I have not done this yet.

B. Less than 6 months

C. 6 months 1 year

D. 1 2 years

E. 2 3 years

F. More than 3 years

Answer: A

2. How many years of experience do you have in developing web-based applications by using ASP.NET

technologies in any version of .NET Framework?

A. I have not done this yet.

B. Less than 6 months

C. 6 months 1 year

D. 1 2 years

E. 2 3 years

F. More than 3 years

Answer: A

3. Rate your level of proficiency in designing and implementing controls, including choosing controls

based on business requirements, designing controls for reusability, and managing state for controls.

A. Very high

B. High

C. Moderate

D. Low

E. Very low

Answer: A

4. Rate your level of proficiency in designing the presentation and layout of an application, including

designing complex layout with Master Pages, designing site navigation, planning for various user agents,

and planning Web sites to support globalization.

A. Very high

B. High

Page 3: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 3 - Test Information Co., Ltd. All rights reserved.

C. Moderate

D. Low

E. Very low

Answer: A

5. Rate your level of proficiency in accessing data and services, including planning vendor-independent

database interactions and leveraging LINQ in data access design.

A. Very high

B. High

C. Moderate

D. Low

E. Very low

Answer: A

6. Rate your level of proficiency in establishing ASP.NET solution structure, including establishing an

error-handling strategy and manipulating configuration files to change ASP.NET behavior.

A. Very high

B. High

C. Moderate

D. Low

E. Very low

Answer: A

7. Rate your level of proficiency in leveraging and extending ASP.NET architecture, including designing

state management strategy, identifying events of the page life cycle, and debugging ASP.NET Web

applications.

A. Very high

B. High

C. Moderate

D. Low

E. Very low

Answer: A

8. Rate your level of proficiency in applying security principles in application design, including establishing

Page 4: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 4 - Test Information Co., Ltd. All rights reserved.

security settings in Web.config, identifying vulnerable elements in applications, and ensuring that

sensitive information in applications is protected.

A. Very high

B. High

C. Moderate

D. Low

E. Very low

Answer: A

9. You are creating an ASP.NET application by using the .NET Framework 3.5.

You use LINQ to SQL to query a Microsoft SQL Server 2008 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 new {

order.OrderID,

order.Description,

details.UnitPrice

};

B. from order in db.Order

join details in db.OrderDetails on

order.OrderID equals details.OrderID into grp

from ord in grp.DefaultIfEmpty()

select new {

order.OrderID,

order.Description,

ord.UnitPrice)

};

Page 5: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 5 - Test Information Co., Ltd. All rights reserved.

C. from order in db.Order

join details in db.OrderDetails on

order.OrderID equals details.OrderID into grp

select new {

order.OrderID,

order.Description,

grp.First().UnitPrice

};

D. from order in db.Orders

join details in db.OrderDetails on

order.OrderID equals details.OrderID into grp

let price = grp.DefaultIfEmpty().First()

select new {

order.OrderID,

order.Description,

price.UnitPrice

};

Answer: A

10. 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

Page 6: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 6 - Test Information Co., Ltd. All rights reserved.

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

Answer: A

11. 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.

var query =

from subject in Subjects

where subject.Books.All(b => b.Price <= 25)

select subject;

You need to find out the results that will be returned from the query.

Page 7: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 7 - Test Information Co., Ltd. All rights reserved.

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

Answer: C

12. 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

Answer: C

13. You are creating an ASP.NET application by using the .NET Framework 3.5.

You write the following code segment. (Line numbers are included for reference only.)

01 string fileDependencyPath =

Server.MapPath("C:\\BatchOutput.xml");

02

03 Response.Cache.SetValidUntilExpires(true);

You need to ensure that all sessions display the most recent data when a batch process updates the

C:\BatchOutput.xml file.

Which code segment should you insert at line 02?

A. Response.AddCacheItemDependency(fileDependencyPath);

Response.Cache.SetCacheability(HttpCacheability.Public);

Page 8: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 8 - Test Information Co., Ltd. All rights reserved.

B. Response.AddFileDependency(fileDependencyPath);

Response.Cache.SetCacheability(HttpCacheability.Public);

C. HttpCacheability httpcache = new HttpCacheability();

Response.Cache.SetCacheability(httpcache, fileDependencyPath);

D. Response.Cache.SetETag(fileDependencyPath);

Response.Cache.SetCacheability(HttpCacheability.Public);

Answer: B

14. You are creating an ASP.NET application by using the .NET Framework 3.5.

You write the following code:

01 Dim fileDependencyPath As String =

Server.MapPath("\BatchOutput.xml")

02

03 Response.Cache.SetValidUntilExpires(True)

You need to ensure that all sessions display the most recent data when a batch process updates the

\BatchOutput.xml file.

What code fragment should you insert at line 02?

A. Response.AddCacheItemDependency(fileDependencyPath)

Response.Cache.SetCacheability(HttpCacheability.Public)

B. Response.AddFileDependency(fileDependencyPath)

Response.Cache.SetCacheability(HttpCacheability.Public)

C. Dim httpcache As HttpCacheability = New HttpCacheability()

Response.Cache.SetCacheability(httpcache, fileDependencyPath)

D. Response.Cache.SetETag(fileDependencyPath)

Response.Cache.SetCacheability(HttpCacheability.Public)

Answer: B

15. You are creating an ASP.NET application by using the .NET Framework 3.5.

Users access the application by using different operating systems and different browsers.

You plan to incorporate a new control in the application.

You need to ensure that the control meets the following business requirements:

¡¤It can be accessed through the Microsoft Visual Studio .NET 2008 tolbox.

¡¤It can operate without any other prerequisite controls

Which type of control should you choose?

Page 9: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 9 - Test Information Co., Ltd. All rights reserved.

A. A user control

B. An ActiveX control

C. A Web Parts control

D. A custom server control

Answer: D

16. You are creating an ASP.NET application by using the .NET Framework 3.5.

Users access the application by using different operating systems and different browsers.

You plan to incorporate a new control in the application.

You need to ensure that the control meets the following business requirements:

¡¤It can be accessed through the Microsoft Visual Studio .NET 2008 toolbox

¡¤It can operate without any other prerequisite controls

Which type of control should you choose?

A. A user control

B. An ActiveX control

C. A Web Parts control

D. A custom server control

Answer: D

17. You are creating an ASP.NET application by using the .NET Framework 3.5.

You review the design of an ASP.NET Web form that collects text input.

The Web form design has the following features:

¡¤It uses the singl-file page model that has script blocks which specify the runat="server" attribute.

¡¤It includes a TextBox control

¡¤It includes a LinkButton control to submit the Web form

¡¤It includes a RegularExpressionValidator control that validates the text input

You need to ensure that the Web form functions properly in browsers that have JavaScript support

disabled.

What should you do?

A. Convert the Web form from the single-file page model to the code-behind page model.

B. Replace the TextBox control with an HtmlInputText control.

C. Replace the LinkButton control with an HtmlInputSubmit control.

D. Replace the RegularExpressionValidator control with a custom server-side validation that calls the

Page.SetFocus method if the input does not match the required format.

Page 10: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 10 - Test Information Co., Ltd. All rights reserved.

Answer: C

18. You are creating an ASP.NET application by using the .NET Framework 3.5.

You review the design of an ASP.NET Web form that collects text input.

The Web form design has the following features:

¡¤It uses the singl-file page model that has script blocks which specify the runat="server" attribute.

¡¤It includes a TextBox control

¡¤It includes a LinkButton control to submit the Web form

¡¤It includes a RegularExpressionValidator control that validates the text input

You need to ensure that the Web form functions properly in browsers that have JavaScript support

disabled.

What should you do?

A. Convert the Web form from the single-file page model to the code-behind page model.

B. Replace the TextBox control with an HtmlInputText control.

C. Replace the LinkButton control with an HtmlInputSubmit control.

D. Replace the RegularExpressionValidator control with a custom server-side validation that calls the

Page.SetFocus method if the input does not match the required format.

Answer: C

19. You are creating ASP.NET applications by using the .NET Framework 3.5.

You are designing a page that guides users through a troubleshooting process. The page will ask a series

of questions and then conditionally display additional troubleshooting steps based on user responses.

You need to choose the appropriate control to implement the user interface.

Which control should you use?

A. ListView

B. MultiView

C. FormView

D. DetailsView

Answer: B

20. You are creating ASP.NET applications by using the .NET Framework 3.5.

You are designing a page that guides users through a troubleshooting process. The page will ask a series

of questions and then conditionally display additional troubleshooting steps based on user responses.

You need to choose the appropriate control to implement the user interface.

Page 11: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 11 - Test Information Co., Ltd. All rights reserved.

Which control should you use?

A. ListView

B. MultiView

C. FormView

D. DetailsView

Answer: B

21. You are creating an ASP.NET application by using the .NET Framework 3.5.

One page contains a DataPager control named DPControl1. Several other pages will display DPControl1.

You need to ensure that DPControl1 has properties that are exposed to the WebPartZone controls on all

other pages.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Add a partstyle element to the WebPartZone control on each page.

B. Add a zonelement element to the WebPartZone control on each page.

C. Copy the DPControl1 control into a new user control. Add a reference to the new user control in each

page by using the @Register directive.

D. Copy the DPControl1 control into a new web form. Add a reference to the new web form in each page

by using the @Register directive.

Answer: BC

22. You are creating an ASP.NET application by using the .NET Framework 3.5.

One page contains a DataPager control named DPControl1. Several other pages will display DPControl1.

You need to ensure that DPControl1 has properties that are exposed to the WebPartZone controls on all

other pages.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Add a partstyle element to the WebPartZone control on each page.

B. Add a zonelement element to the WebPartZone control on each page.

C. Copy the DPControl1 control into a new user control. Add a reference to the new user control in each

page by using the @Register directive.

D. Copy the DPControl1 control into a new web form. Add a reference to the new web form in each page

by using the @Register directive.

Answer: BC

23. You are creating an ASP.NET application by using the .NET Framework 3.5.

Page 12: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 12 - Test Information Co., Ltd. All rights reserved.

You need to create a UI element in the application to meet the following requirements:

¡¤Custom logic can be implemented

¡¤The element can be used in multiple places on each page

¡¤The element can be used on mutiple pages within the application.

¡¤The el e ment can be r edi stri but ed f or use i n ot her appli cati ons wit hout shari ng sour ce code or l ayout

files.

What should you do?

A. Create a theme.

B. Create a master page.

C. Create a user control.

D. Create a custom Web control.

Answer: D

24. You are creating an ASP.NET application by using the .NET Framework 3.5.

You need to create a UI element in the application to meet the following requirements:

¡¤Custom logic can be implemented

¡¤The element can be used in muliple places on each page.

¡¤The element can be used on multiple pages within the application

¡¤The el e ment can be r edi stri but ed f or use i n ot her appli cati ons wit hout shari ng sour ce code or l ayout

files.

What should you do?

A. Create a theme.

B. Create a master page.

C. Create a user control.

D. Create a custom Web control.

Answer: D

25. You are creating an ASP.NET application by using the .NET Framework 3.5.

You plan to develop a custom control library. Developers will use the control on Web pages in multiple

applications. Each ASP.NET application will be configured by using different state management

strategies.

You need to ensure consistent state management for all instances of the control.

Which state repository should you choose?

A. ViewState

Page 13: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 13 - Test Information Co., Ltd. All rights reserved.

B. ControlState

C. SessionState

D. ApplicationState

Answer: B

26. You are creating an ASP.NET application by using the .NET Framework 3.5.

You plan to develop a custom control library. Developers will use the control on Web pages in multiple

applications. Each ASP.NET application will be configured by using different state management

strategies.

You need to ensure consistent state management for all instances of the control.

Which state repository should you choose?

A. ViewState

B. ControlState

C. SessionState

D. ApplicationState

Answer: B

27. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains 10 Web forms. Each Web form displays customer information that is retrieved

from the database by using a data-bound Web server control.

You need to ensure that the data-bound Web Server control meets the following business requirements:

¡¤It displays a single record at a time

¡¤It allows the user to page through multiple customer records

¡¤It can create, update, and delete cstomer records in the database.

¡¤It displays customer information by using a different layout on each Web form

Which data-bound Web server control should you use?

A. DataList

B. ListView

C. FormView

D. DetailsView

Answer: C

28. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains 10 Web forms. Each Web form displays customer information that is retrieved

Page 14: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 14 - Test Information Co., Ltd. All rights reserved.

from the database by using a data-bound Web server control.

You need to ensure that the data-bound Web Server control meets the following business requirements:

¡¤It displays a single record at a time

¡¤It allows the user to page through multiple customer records

¡¤It can create, update, and delete customer records in the database

¡¤It displays customer iformation by using a different layout on each Web form.

Which data-bound Web server control should you use?

A. DataList

B. ListView

C. FormView

D. DetailsView

Answer: C

29. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in your application to display product information by using a data-bound Web

server control.

You need to identify the data-bound Web server control that meets the following business requirements:

¡¤Displays information by using a customized tem template for the data.

¡¤Supports data paging by using the DataPager Web server control

Which Web server control should you use?

A. DataList

B. Repeater

C. ListView

D. FormView

Answer: C

30. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in your application to display product information by using a data-bound Web

server control.

You need to identify the data-bound Web server control that meets the following business requirements:

¡¤Displays informatio

by using a customized item template for the data.

¡¤Supports data paging by using the DataPager Web server control

Which Web server control should you use?

A. DataList

B. Repeater

Page 15: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 15 - Test Information Co., Ltd. All rights reserved.

C. ListView

D. FormView

Answer: C

31. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in your application by using a data-bound Web server control. The Web form

displays employee information.

You need to ensure that the data-bound Web server control meets the following business requirements:

¡¤It provides buil-in sort capabilities.

¡¤It displays multiple records by using a default tabular format

Which data-bound Web server control should you use?

A. DataList

B. ListView

C. GridView

D. DetailsView

Answer: C

32. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in your application by using a data-bound Web server control. The Web form

displays employee information.

You need to ensure that the data-bound Web server control meets the following business requirements:

¡¤It provides buil-in sort capabilities.

¡¤It displays multiple records by using a default tabular format

Which data-bound Web server control should you use?

A. DataList

B. ListView

C. GridView

D. DetailsView

Answer: C

33. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in the application. You add a TextBox control and a Button control to the form.

When the user clicks the Button control, the input text from the TextBox control is stored in a database.

You also add a Validation control to the form to verify whether the input data is valid before it is stored in

Page 16: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 16 - Test Information Co., Ltd. All rights reserved.

the database.

You discover that users who have Javascript disabled in their Web browsers can store invalid data in the

database.

You need to ensure that only valid data is submitted to the database.

What should you do?

A. Set the CausesValidation property of the Button control to True.

B. Add the ValidateRequest="true" attribute to the Page directive of the Web form.

C. Call the Page.Validate method before data is stored on the Click event handler of the Button control.

D. Submit the data by using the Click event handler of the Button control only when the Page.IsValid

property is True.

Answer: D

34. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in the application. You add a TextBox control and a Button control to the form.

When the user clicks the Button control, the input text from the TextBox control is stored in a database.

You also add a Validation control to the form to verify whether the input data is valid before it is stored in

the database.

You discover that users who have Javascript disabled in their Web browsers can store invalid data in the

database.

You need to ensure that only valid data is submitted to the database.

What should you do?

A. Set the CausesValidation property of the Button control to True.

B. Add the ValidateRequest="True" attribute to the Page directive of the Web form.

C. Call the Page.Validate method before data is stored on the Click event handler of the Button control.

D. Submit the data by using the Click event handler of the Button control only when the Page.IsValid

property is True.

Answer: D

35. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in the application that allows users to provide personal information. You add a

DropDownList control to the form to capture the residential country of the user.

The default item that the DropDownList control displays is the Select Country option.

You need to ensure that users select a valid country other than the default option from the DropDownList

control. You also need to ensure that the form is created and maintained by using the minimum amount of

Page 17: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 17 - Test Information Co., Ltd. All rights reserved.

development effort.

Which validation control should you use?

A. RangeValidator

B. CustomValidator

C. RequiredFieldValidator

D. RegularExpressionValidator

Answer: C

36. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in the application that allows users to provide personal information. You add a

DropDownList control to the form to capture the residential country of the user.

The default item that the DropDownList control displays is the Select Country option.

You need to ensure that users select a valid country other than the default option from the DropDownList

control. You also need to ensure that the form is created and maintained by using the minimum amount of

development effort.

Which validation control should you use?

A. RangeValidator

B. CustomValidator

C. RequiredFieldValidator

D. RegularExpressionValidator

Answer: C

37. You are creating an ASP.NET application by using the .NET Framework 3.5.

You use the built-in ASP.NET Web server controls in all the Web forms of the application.

You access and modify the properties of all Web server controls in the code-behind class of the Web

forms.

You need to add custom client-side and AJAX behavior to the ASP.NET Web server controls. You also

need to ensure minimal effect on the current application code.

What should you do?

A. Add an UpdatePanel control in the Web forms for each built-in ASP.NET Web server control.

Place the corresponding ASP.NET Web server controls inside the UpdatePanel controls.

B. Create a custom extender control for each built-in ASP.NET Web server control.

Add the extender controls along with the ASP.NET Web server controls in the Web forms.

C. Create a Web UserControl control for each built-in ASP.NET Web server control.

Page 18: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 18 - Test Information Co., Ltd. All rights reserved.

Encapsulate the corresponding ASP.NET Web server control and the client-side and AJAX behavior code

in the UserControl control.

Replace each built-in ASP.NET Web server control with the UserControl control in the Web forms.

D. Create a custom Web server control for each built-in ASP.NET Web server control.

Add the corresponding ASP.NET Web server control as a child control, and encapsulate the client-side

and AJAX behavior code in the custom Web server control.

Replace each built-in ASP.NET Web server control with the custom Web server control in the Web forms.

Answer: B

38. You are creating an ASP.NET application by using the .NET Framework 3.5.

You use the built-in ASP.NET Web server controls in all the Web forms of the application.

You access and modify the properties of all Web server controls in the code-behind class of the Web

forms.

You need to add custom client-side and AJAX behavior to the ASP.NET Web server controls. You also

need to ensure minimal effect on the current application code.

What should you do?

A. Add an UpdatePanel control in the Web forms for each built-in ASP.NET Web server control.

Place the corresponding ASP.NET Web server controls inside the UpdatePanel controls.

B. Create a custom extender control for each built-in ASP.NET Web server control.

Add the extender controls along with the ASP.NET Web server controls in the Web forms.

C. Create a Web UserControl control for each built-in ASP.NET Web server control.

Encapsulate the corresponding ASP.NET Web server control and the client-side and AJAX behavior code

in the UserControl control.

Replace each built-in ASP.NET Web server control with the UserControl control in the Web forms.

D. Create a custom Web server control for each built-in ASP.NET Web server control.

Add the corresponding ASP.NET Web server control as a child control, and encapsulate the client-side

and AJAX behavior code in the custom Web server control.

Replace each built-in ASP.NET Web server control with the custom Web server control in the Web forms.

Answer: B

39. You are creating an ASP.NET application by using the .NET Framework 3.5.

You need to ensure that the application meets the following requirements:

¡¤The layout that must be applied to the pages in the application can be selected by the developers

¡¤The layout of the pages can bemodified by the developers without the source code modification.

Page 19: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 19 - Test Information Co., Ltd. All rights reserved.

¡¤A consistent page layout is maintained

What should you do?

A. Create multiple themes for the application. Specify a theme for the application in the Web.config file.

B. Create multiple master pages for the application. Specify the master page for the application in the

Web.config file.

C. Create a master page that uses multiple Web Part zones. Disable membership and personalization for

the application.

D. Ensure that all pages use multiple Web Part zones. Enable membership and personalization for the

application.

Answer: B

40. You are creating an ASP.NET application by using the .NET Framework 3.5.

You need to ensure that the application meets the following requirements:

¡¤The layout thatmust be applied to the pages in the application can be selected by the developers.

¡¤The layout of the pages can be modified by the developers without the source code modification

¡¤A consistent page layout is maintained

What should you do?

A. Create multiple themes for the application. Specify a theme for the application in the Web.config file.

B. Create multiple master pages for the application. Specify the master page for the application in the

Web.config file.

C. Create a master page that uses multiple Web Part zones. Disable membership and personalization for

the application.

D. Ensure that all pages use multiple Web Part zones. Enable membership and personalization for the

application.

Answer: B

41. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will use multiple master pages.

Each master page will have an Image control named ImageControl1. ImageControl1 will be added directly

to some master pages and through a user control to the other master pages.

You need to ensure that the content pages of the application can dynamically reference the image

displayed by ImageControl1.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. On each content page, call the Page.FindControl method to return a reference to ImageControl1.

Page 20: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 20 - Test Information Co., Ltd. All rights reserved.

B. On each content page, use the @ MasterType directive to create a strongly typed master page

reference.

C. Code each master page class to use the Page_PreInit method to assign the image displayed by

ImageControl1.

D. Code each master page class to implement a common interface that exposes the ImageUrl property of

the Image control.

Answer: BD

42. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will use multiple master pages.

Each master page will have an Image control named ImageControl1. ImageControl1 will be added directly

to some master pages and through a user control to the other master pages.

You need to ensure that the content pages of the application can dynamically reference the image

displayed by ImageControl1.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. On each content page, call the Page.FindControl method to return a reference to ImageControl1.

B. On each content page, use the @ MasterType directive to create a strongly typed master page

reference.

C. Code each master page class to use the Page_PreInit method to assign the image displayed by

ImageControl1.

D. Code each master page class to implement a common interface that exposes the ImageUrl property of

the Image control.

Answer: BD

43. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains a reporting section. Pages for the reporting section are stored in the ~/Reports

folder. The Web pages in the ~/Reports folder use the same master page as pages that are not in the

reporting section.

You need to modify the pages in the reporting section to meet the following requirements:

¡¤The l ayot of the pages in the reporting section includes content areas that are not present on other

pages in the site.

¡¤The layout of the reporting sectio-specific content is visible in the Microsoft Visual Studio design mode.

¡¤The pages i n t he r eporti ng secton reflects the changes if any layout changes are made to the site in

future.

Page 21: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 21 - Test Information Co., Ltd. All rights reserved.

What should you do?

A. Create a nested master page that binds to the existing master page.

Add the reporting section-specific ContentPlaceHolder controls to the new master page.

Configure content pages in the ~/Reports folder to use the new master page.

B. Create a custom page class that derives from the System.Web.UI.Page class.

Use the Page_Load method of the custom class to dynamically add controls that display the reporting

section-specific content.

Configure content pages in the ~/Reports folder to derive from the custom page class.

C. Copy all HTML markups and ASP.NET controls from the existing master page to a new master page

created specifically for the reporting section.

Add the reporting section-specific ContentPlaceHolder controls to the new master page.

Configure content pages in the ~/Reports folder to use the new master page.

D. Add new reporting section-specific ContentPlaceHolder controls to the existing master page.

Add default HTML markup and ASP.NET controls to each new ContentPlaceHolder control.

Remove Content controls that reference the new ContentPlaceHolder controls from each new content

page that is created outside the ~/Reports folder.

Answer: A

44. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains a reporting section. Pages for the reporting section are stored in the ~/Reports

folder. The Web pages in the ~/Reports folder use the same master page as pages that are not in the

reporting section.

You need to modify the pages in the reporting section to meet the following requirements:

¡¤The l ayout of t he pages i n t he r eporti ng secti on i ncl udes cont ent ar eas t hat ar e not pr esent on ot her

pages in the site.

¡¤The ayout of the reporting section-specific content is visible in the Microsoft Visual Studio design mode.

¡¤The pages i n t he r eporti ng secti on r efl ect s t he changes if any l ayout changes ar e made t o t he sit e i n

future.

What should you do?

A. Create a nested master page that binds to the existing master page.

Add the reporting section-specific ContentPlaceHolder controls to the new master page.

Configure content pages in the ~/Reports folder to use the new master page.

B. Create a custom page class that derives from the System.Web.UI.Page class.

Use the Page_Load method of the custom class to dynamically add controls that display the reporting

Page 22: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 22 - Test Information Co., Ltd. All rights reserved.

section-specific content.

Configure content pages in the ~/Reports folder to derive from the custom page class.

C. Copy all HTML markups and ASP.NET controls from the existing master page to a new master page

created specifically for the reporting section.

Add the reporting section-specific ContentPlaceHolder controls to the new master page.

Configure content pages in the ~/Reports folder to use the new master page.

D. Add new reporting section-specific ContentPlaceHolder controls to the existing master page.

Add default HTML markup and ASP.NET controls to each new ContentPlaceHolder control.

Remove Content controls that reference the new ContentPlaceHolder controls from each new content

page that is created outside the ~/Reports folder.

Answer: A

45. You are creating ASP.NET applications by using the .NET Framework 3.5.

The applications will be hosted on the same physical Web server.

You have the following page layout requirements:

¡¤A common page layout that applies to all the ASP.NET pages across the Web application

¡¤All pages to automatically reflect changes that are made to the common page layou

You create a master page that provides the page layout.

You need to implement a solution that meets the layout requirements.

Which three additional tasks should you perform? (Each correct answer presents part of the solution.

Choose three.)

A. Add a @ MasterType directive to each ASP.NET page.

B. Add a ContentPlaceholder control to each ASP.NET page.

C. Copy the master page into a single folder on the Web server.

D. Set the MasterPageFile property on each ASP.NET page to the virtual path of the master page file.

E. Configure a virtual directory within the default Web site, and point the virtual directory to the folder that

contains the master page.

F. Configure a virtual directory within each Web application, and point the virtual directory to the folder that

contains the master page.

Answer: CDF

46. You are creating ASP.NET applications by using the .NET Framework 3.5.

The applications will be hosted on the same physical Web server.

You have the following page layout requirements:

Page 23: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 23 - Test Information Co., Ltd. All rights reserved.

¡¤A common page layout that applies to all theASP.NET pages across the Web applications

¡¤All pages to automatically reflect changes that are made to the common page layou

You create a master page that provides the page layout.

You need to implement a solution that meets the layout requirements.

Which three additional tasks should you perform? (Each correct answer presents part of the solution.

Choose three.)

A. Add a @ MasterType directive to each ASP.NET page.

B. Add a ContentPlaceholder control to each ASP.NET page.

C. Copy the master page into a single folder on the Web server.

D. Set the MasterPageFile property on each ASP.NET page to the virtual path of the master page file.

E. Configure a virtual directory within the default Web site, and point the virtual directory to the folder that

contains the master page.

F. Configure a virtual directory within each Web application, and point the virtual directory to the folder that

contains the master page.

Answer: CDF

47. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application displays a price list that contains 100 items. The customers use desktop computers,

PDAs, mobile phones, or other mobile devices to access the application.

The application uses a master page that includes the following layout:

¡¤A site header at thetop of the page.

¡¤A navigation structure at the side of the page

¡¤Content on the remaining space on the page

You need to ensure optimal rendering of the price list for each customer, irrespective of the device

category used.

What should you do?

A. Create a custom master page for mobile-device browsers.

Implement a MobilePage class for each device category.

B. Create a custom master page for mobile-device browsers.

Modify the page that contains the price list to use device filters along with the MasterPageFile attribute of

the @ Page directive.

C. Add a MultiView control and two View controls to the existing page that contains the price list.

Set the ActiveViewIndex value of the MultiView control after you evaluate the Request.Browser.Type

property.

Page 24: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 24 - Test Information Co., Ltd. All rights reserved.

D. Add a ListView control and a DataPager control to the existing page that contains the price list.

Set the PageSize value of the DataPager control after you evaluate the

Request.Browser.ScreenPixelsHeight property.

Answer: B

48. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application displays a price list that contains 100 items. The customers use desktop computers,

PDAs, mobile phones, or other mobile devices to access the application.

The application uses a master page that includes the following layout:

¡¤A site header at the top of the page

¡¤A navigation structure at the side of the page

¡¤Content on the remaining space on the page

You need to ensure optimal rendering of the price list for each customer, irrespective of the device

category used.

What should you do?

A. Create a custom master page for mobile-device browsers.

Implement a MobilePage class for each device category.

B. Create a custom master page for mobile-device browsers.

Modify the page that contains the price list to use device filters along with the MasterPageFile attribute of

the @ Page directive.

C. Add a MultiView control and two View controls to the existing page that contains the price list.

Set the ActiveViewIndex value of the MultiView control after you evaluate the Request.Browser.Type

property.

D. Add a ListView control and a DataPager control to the existing page that contains the price list.

Set the PageSize value of the DataPager control after you evaluate the

Request.Browser.ScreenPixelsHeight property.

Answer: B

49. You maintain an ASP.NET application by using the .NET Framework 3.5.

The application is currently accessed from desktop browsers. There are RadioButtonList objects on

several pages in the application.

You are updating the application to meet the following requirements:

¡¤ When accessed fr o m mobil e devi ces, all Radi oButt onLi st obj ect s must be di spl ayed as Dr op Do wnLi st

objects to conserve screen space.

Page 25: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 25 - Test Information Co., Ltd. All rights reserved.

¡¤When accessed from desktop browsers, the application must remain unchanged

You need to ensure that the application meets the requirements.

What should you do?

A. Create a class that extends the WebControlAdapter class and register it in a .browser file.

B. Create a class that extends the DropDownList class and replace all existing instances of the

RadioButtonList class with it.

C. Replace all existing instances of the RadioButtonList class with instances of the DropDownList class.

D. Update the Page_PreRender event handler to dynamically create a DropDownList control when the

Request.Browser.IsMobileDevice property is true.

Answer: A

50. You maintain an ASP.NET application by using the .NET Framework 3.5.

The application is currently accessed from desktop browsers. There are RadioButtonList objects on

several pages in the application.

You are updating the application to meet the following requirements:

¡¤ When accessed fr o m mobil e devi ces, all Radi oButt onLi st obj ect s must be di spl ayed as Dr op Do wnLi st

objects to conserve screen space.

¡¤When accessed from desktop browsers, the applicaton must remain unchanged.

You need to ensure that the application meets the requirements.

What should you do?

A. Create a class that extends the WebControlAdapter class and register it in a .browser file.

B. Create a class that extends the DropDownList class and replace all existing instances of the

RadioButtonList class with it.

C. Replace all existing instances of the RadioButtonList class with instances of the DropDownList class.

D. Update the Page_PreRender event handler to dynamically create a DropDownList control when the

Request.Browser.IsMobileDevice property is True.

Answer: A

51. You are creating an ASP.NET application by using the .NET Framework 3.5.

Users access the application by using different browsers and mobile devices.

You need to ensure that the Web application renders output that fully uses the capabilities of the mobile

devices.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Add a ClientTarget attribute to the @ Page directive of the home page.

Page 26: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 26 - Test Information Co., Ltd. All rights reserved.

B. Add a custom browser definition file to the application App_Browsers folder.

C. Configure the application code to query the Capabilities property of the Request.Browser object.

D. Configure the application code to call the RegisterClientScriptBlock method of the ClientScript object.

Answer: BC

52. You are creating an ASP.NET application by using the .NET Framework 3.5.

Users access the application by using different browsers and mobile devices.

You need to ensure that the Web application renders output that fully uses the capabilities of the mobile

devices.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Add a ClientTarget attribute to the @ Page directive of the home page.

B. Add a custom browser definition file to the application App_Browsers folder.

C. Configure the application code to query the Capabilities property of the Request.Browser object.

D. Configure the application code to call the RegisterClientScriptBlock method of the ClientScript object.

Answer: BC

53. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will allow end users to select a theme that will be applied to all the pages that the user

visits. The preferred theme of the end user will be stored in a profile property.

You need to identify the appropriate method to apply the preferred theme to the page.

Which method should you choose?

A. The page constructor

B. The handler for the Page.Load event

C. The handler for the Page.PreInit event

D. The handler for the Page.Render event

Answer: C

54. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will allow end users to select a theme that will be applied to all the pages that the user

visits. The preferred theme of the end user will be stored in a profile property.

You need to identify the appropriate method to apply the preferred theme to the page.

Which method should you choose?

A. The page constructor

B. The handler for the Page.Load event

Page 27: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 27 - Test Information Co., Ltd. All rights reserved.

C. The handler for the Page.PreInit event

D. The handler for the Page.Render event

Answer: C

55. You are creating an ASP.NET application by using the .NET Framework 3.5.

You need to ensure that the application meets the following requirements:

¡¤Eac page must have a different layout of page elements.

¡¤The di spl ay pr operti es of t he ASP. NET contr ol s must be consi st ent acr oss pages, r egar dl ess of t he

control style properties set within the individual pages.

What should you do?

A. Create a master page that references an external cascading style sheet file.

B. Define a skin for each type of ASP.NET server control that is used in the application.

C. In the Web.config file, specify a value for the masterPageFile attribute of the pages element.

D. In the Web.config file, specify a value for the styleSheetTheme attribute of the pages element.

Answer: B

56. You are creating an ASP.NET application by using the .NET Framework 3.5.

You need to ensure that the application meets the following requirements:

¡¤Eachpage must have a different layout of page elements.

¡¤The di spl ay pr operti es of t he ASP. NET contr ol s must be consi st ent acr oss pages, r egar dl ess of t he

control style properties set within the individual pages.

What should you do?

A. Create a master page that references an external cascading style sheet file.

B. Define a skin for each type of ASP.NET server control that is used in the application.

C. In the Web.config file, specify a value for the masterPageFile attribute of the pages element.

D. In the Web.config file, specify a value for the styleSheetTheme attribute of the pages element.

Answer: B

57. You are creating ASP.NET applications by using the .NET Framework 3.5.

You maintain a Web site that contains several nested pages defined in its site map file.

You plan to implement a control on each page of the Web site.

You need to ensure that the control meets the following requirements:

¡¤It indicates the current location of the user in the Web site navigation structure

¡¤It displays a maximum of thre

pages.

Page 28: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 28 - Test Information Co., Ltd. All rights reserved.

What should you do?

A. Add a TreeView control on each page, and set the MaxDataBindDepth property to 3.

B. Add a SiteMapPath control on each page, and set the ParentLevelsDisplayed property to 3.

C. Add a SiteMapPath control in the root of the Web site, and set the ParentLevelsDisplayed property to

3.

D. Add a TreeView control on each page, and set the StartingNodeOffset property in the

XmlSiteMapProvider class to 3.

Answer: B

58. You are creating ASP.NET applications by using the .NET Framework 3.5.

You maintain a Web site that contains several nested pages defined in its site map file.

You plan to implement a control on each page of the Web site.

You need to ensure that the control meets the following requirements:

¡¤It indicates the current loation of the user in the Web site navigation structure.

¡¤It displays a maximum of three pages

What should you do?

A. Add a TreeView control on each page, and set the MaxDataBindDepth property to 3.

B. Add a SiteMapPath control on each page, and set the ParentLevelsDisplayed property to 3.

C. Add a SiteMapPath control in the root of the Web site, and set the ParentLevelsDisplayed property to

3.

D. Add a TreeView control on each page, and set the StartingNodeOffset property in the

XmlSiteMapProvider class to 3.

Answer: B

59. You are creating ASP.NET applications by using the .NET Framework 3.5.

You manage a Web site that currently uses the SiteMapPath control that is connected to a sitemap file.

You add a TreeView control to the Web site.

You need to configure the TreeView control to display the site navigation from the site map file.

What should you do?

A. Set the siteMapFile property in the XmlSiteMapProvider control.

Set the PopulateNodesFromClient property to true in the TreeView control.

B. Set the TransformFile property to connect the XmlDataSource control to the site map file.

Configure the TreeView control to use the XmlDataSource control.

C. Set the StartingNodeOffset property in the XmlSiteMapProvider control.

Page 29: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 29 - Test Information Co., Ltd. All rights reserved.

Set the PopulateNodesFromClient property to true in the TreeView control.

D. Configure a SiteMapDataSource control to use the XmlSiteMapProvider control.

Configure the TreeView control to use the SiteMapDataSource control.

Answer: D

60. You are creating ASP.NET applications by using the .NET Framework 3.5.

You manage a Web site that currently uses the SiteMapPath control that is connected to a sitemap file.

You add a TreeView control to the Web site.

You need to configure the TreeView control to display the site navigation from the site map file.

What should you do?

A. Set the siteMapFile property in the XmlSiteMapProvider control.

Set the PopulateNodesFromClient property to True in the TreeView control.

B. Set the TransformFile property to connect the XmlDataSource control to the site map file.

Configure the TreeView control to use the XmlDataSource control.

C. Set the StartingNodeOffset property in the XmlSiteMapProvider control.

Set the PopulateNodesFromClient property to True in the TreeView control.

D. Configure a SiteMapDataSource control to use the XmlSiteMapProvider control.

Configure the TreeView control to use the SiteMapDataSource control.

Answer: D

61. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses the SiteMapPath control and a SiteMapProvider object.

The application contains a page named ViewArticle.aspx that displays an article. The article is retrieved

from a Microsoft SQL Server 2008 database by using the ArticleId value. The value is obtained as a

QueryString parameter.

You need to ensure that the ViewArticle.aspx page can be used to view articles without constructing a

SiteMapNode node for each article.

What should you do?

A. Invoke the AddNode method.

B. Invoke the GetRootNodeCore method.

C. Invoke the ResolveSiteMapNode method.

D. Handle the SiteMap.SiteMapResolve event.

Answer: D

Page 30: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 30 - Test Information Co., Ltd. All rights reserved.

62. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses the SiteMapPath control and a SiteMapProvider object.

The application contains a page named ViewArticle.aspx that displays an article. The article is retrieved

from a Microsoft SQL Server 2008 database by using the ArticleId value. The value is obtained as a

QueryString parameter.

You need to ensure that the ViewArticle.aspx page can be used to view articles without constructing a

SiteMapNode node for each article.

What should you do?

A. Invoke the AddNode method.

B. Invoke the GetRootNodeCore method.

C. Invoke the ResolveSiteMapNode method.

D. Handle the SiteMap.SiteMapResolve event.

Answer: D

63. You are creating an ASP.NET application by using the .NET Framework 3.5.

Airline passengers access the application over the Internet and from airport kiosks around the world. The

airport kiosks do not allow users to modify browser settings.

You have created language-specific resources for all static text elements in the application.

You need to ensure that the content is displayed in the preferred language of the users, regardless of their

physical location.

What should you do?

A. Set the value of the Page.UICulture property to a value stored in a user profile property.

B. Set the value of the UICulture attribute to auto within the @ Page directive on each ASP.NET page.

C. Set the value of the Thread.CurrentThread.CurrentUICulture property to CultureInfo.InvariantCulture.

D. Set the value of the enableClientBasedCulture attribute to true within the globalization element of the

Web.config file.

Answer: A

64. You are creating an ASP.NET application by using the .NET Framework 3.5.

Airline passengers access the application over the Internet and from airport kiosks around the world. The

airport kiosks do not allow users to modify browser settings.

You have created language-specific resources for all static text elements in the application.

You need to ensure that the content is displayed in the preferred language of the users, regardless of their

physical location.

Page 31: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 31 - Test Information Co., Ltd. All rights reserved.

What should you do?

A. Set the value of the Page.UICulture property to a value stored in a user profile property.

B. Set the value of the UICulture attribute to auto within the @ Page directive on each ASP.NET page.

C. Set the value of the Thread.CurrentThread.CurrentUICulture property to CultureInfo.InvariantCulture.

D. Set the value of the enableClientBasedCulture attribute to True within the globalization element of the

Web.config file.

Answer: A

65. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application is accessed by users around the world. You plan to localize the Default.aspx page for

Spanish-speaking users. You add a resource file named Default.aspx.es-ES.resx to the

App_LocalResources folder of the application.

The Default.aspx page renders Spanish content for users in Spain. English content is rendered for

Spanish-speaking users in other parts of the world.

You need to ensure that the Default.aspx page renders Spanish content for all users whose browser

settings specify the Spanish language, regardless of their physical location.

What should you do?

A. Rename the Default.aspx.es-ES.resx file to Default.aspx.es.resx.

B. Copy the Default.aspx.es-ES.resx file to the App_GlobalResources folder.

C. Set the value of the Culture attribute to es-ES within the @ Page directive on the Default.aspx page.

D. Set the value of the UICulture attribute to auto:es-ES within the @ Page directive on the Default.aspx

page.

Answer: A

66. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application is accessed by users around the world. You plan to localize the Default.aspx page for

Spanish-speaking users. You add a resource file named Default.aspx.es-ES.resx to the

App_LocalResources folder of the application.

The Default.aspx page renders Spanish content for users in Spain. English content is rendered for

Spanish-speaking users in other parts of the world.

You need to ensure that the Default.aspx page renders Spanish content for all users whose browser

settings specify the Spanish language, regardless of their physical location.

What should you do?

A. Rename the Default.aspx.es-ES.resx file to Default.aspx.es.resx.

Page 32: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 32 - Test Information Co., Ltd. All rights reserved.

B. Copy the Default.aspx.es-ES.resx file to the App_GlobalResources folder.

C. Set the value of the Culture attribute to es-ES within the @ Page directive on the Default.aspx page.

D. Set the value of the UICulture attribute to auto:es-ES within the @ Page directive on the Default.aspx

page.

Answer: A

67. You are creating an ASP.NET application by using the .NET Framework 3.5.

Each page within the application will contain a disclaimer that will use a Label control. The Label control

on each page will need to support localization in English and French.

You need to implement a resource file strategy that meets the following requirements:

¡¤A Frenc-region user views the disclaimer in French.

¡¤All other users view the disclaimer in English

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Create a resource file for each page for the en-US culture.

Place the files in the App_LocalResources directory.

B. Create a resource file for each page for the fr culture.

Place the files in the App_LocalResources directory.

C. Create a resource file for each page for the fr-FR culture.

Place the files in the App_GlobalResources directory.

D. Create a resource file for each page without any culture specified.

Place the files in the App_GlobalResources directory.

E. Create a resource file for each page without any culture specified.

Place the files in the App_LocalResources directory.

Answer: BE

68. You are creating an ASP.NET application by using the .NET Framework 3.5.

Each page within the application will contain a disclaimer that will use a Label control. The Label control

on each page will need to support localization in English and French.

You need to implement a resource file strategy that meets the following requirements:

¡¤A Frenc-region user views the disclaimer in French.

¡¤All other users view the disclaimer in English

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Create a resource file for each page for the en-US culture.

Place the files in the App_LocalResources directory.

Page 33: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 33 - Test Information Co., Ltd. All rights reserved.

B. Create a resource file for each page for the fr culture.

Place the files in the App_LocalResources directory.

C. Create a resource file for each page for the fr-FR culture.

Place the files in the App_GlobalResources directory.

D. Create a resource file for each page without any culture specified.

Place the files in the App_GlobalResources directory.

E. Create a resource file for each page without any culture specified.

Place the files in the App_LocalResources directory.

Answer: BE

69. 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 pagin

¡¤Provide optimistic concurrenc

Which data access object should you use in the DAL?

A. SqlDataReader

B. SqlDataAdapter

C. OleDbDataReader

D. OleDbDataAdapter

Answer: D

70. 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 pagin

¡¤Provide optimistic concurrenc

Which data access object should you use in the DAL?

A. SqlDataReader

B. SqlDataAdapter

C. OleDbDataReader

D. OleDbDataAdapter

Page 34: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 34 - Test Information Co., Ltd. All rights reserved.

Answer: D

71. 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

Answer: B

72. 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

¡¤Prvide 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

Answer: B

73. You are creating an ASP.NET application by using the .NET Framework 3.5.

The master page contains a Web control that retrieves data from several data sources, including Microsoft

Page 35: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 35 - Test Information Co., Ltd. All rights reserved.

SQL Server 2008 and Microsoft Access 2007.

You need to ensure that the Web control can provide the retrieved data for use in other controls on the

page.

What should you do?

A. Use a OleDbLiteral object.

B. Use a OleDbPermission object.

C. Use a OleDbDataTableReader object.

D. Use a OleDbDataTableAdapter object.

Answer: D

74. You are creating an ASP.NET application by using the .NET Framework 3.5.

The master page contains a Web control that retrieves data from several data sources, including Microsoft

SQL Server 2008 and Microsoft Access 2007.

You need to ensure that the Web control can provide the retrieved data for use in other controls on the

page.

What should you do?

A. Use a OleDbLiteral object.

B. Use a OleDbPermission object.

C. Use a OleDbDataTableReader object.

D. Use a OleDbDataTableAdapter object.

Answer: D

75. 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.

Page 36: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 36 - Test Information Co., Ltd. All rights reserved.

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.

Answer: C

76. 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.

Answer: C

77. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores data in a database that might be implemented in Microsoft SQL Server, Microsoft

Access, or a variety of third-party databases.

You need to implement a data access strategy that meets the following requirements:

¡¤The same data access code is used for all database platforms

¡¤The appliation defines the SQL syntax used.

¡¤The application reduces the vulnerability to SQL injection attacks

What should you do?

A. Use the SqlCommandBuilder class.

B. Use parameterized SQL statements.

Page 37: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 37 - Test Information Co., Ltd. All rights reserved.

C. Use parameterized stored procedures.

D. Use dynamic SQL statements and the StringBuilder class.

E. Use dynamic SQL statements and string concatenation.

Answer: B

78. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores data in a database that might be implemented in Microsoft SQL Server, Microsoft

Access, or a variety of third-party databases.

You need to implement a data access strategy that meets the following requirements:

¡¤The same data access code is used for all database platforms

¡¤The application defines te SQL syntax used.

¡¤The application reduces the vulnerability to SQL injection attacks

What should you do?

A. Use the SqlCommandBuilder class.

B. Use parameterized SQL statements.

C. Use parameterized stored procedures.

D. Use dynamic SQL statements and the StringBuilder class.

E. Use dynamic SQL statements and string concatenation.

Answer: B

79. 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.

Page 38: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 38 - Test Information Co., Ltd. All rights reserved.

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')

Answer: BD

80. 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')

Answer: BD

81. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in the application. You add a GridView control to the Web form.

You plan to use an existing business object. The business object provides the select, insert, update, and

delete methods.

You need to implement data binding that will allow the GridView control to take full advantage of the

business object.

What should you do?

A. Set the DataSource property of the GridView control to an instance of the business object.

Page 39: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 39 - Test Information Co., Ltd. All rights reserved.

B. Set the DataSourceID property of the GridView control to an instance of the business object.

C. Set the DataSourceID property of the GridView control to an ObjectDataSource instance that uses the

business object.

D. Set the DataSource property of the GridView to the result a LINQ to Objects lambda expression to

query the business object.

Answer: C

82. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create a Web form in the application. You add a GridView control to the Web form.

You plan to use an existing business object. The business object provides the select, insert, update, and

delete methods.

You need to implement data binding that will allow the GridView control to take full advantage of the

business object.

What should you do?

A. Set the DataSource property of the GridView control to an instance of the business object.

B. Set the DataSourceID property of the GridView control to an instance of the business object.

C. Set the DataSourceID property of the GridView control to an ObjectDataSource instance that uses the

business object.

D. Set the DataSource property of the GridView to the result a LINQ to Objects lambda expression to

query the business object.

Answer: C

83. 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

Answer: C

Page 40: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 40 - Test Information Co., Ltd. All rights reserved.

84. 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 GridViewcontrols.

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

Answer: C

85. You are creating ASP.NET applications by using the .NET Framework 3.5.

You are evaluating an application design that contains the following requirements:

¡¤All DropDownList controls are dat-bound.

¡¤Updates to the DropDownList controls do not require redeployment o

the application.

You need to implement the data source control to meet the requirements.

What should you do?

A. Create an enum to represent the data in the DropDownList control. Bind the enum to the DataSource

property of the DropDownList control.

B. Create an enum to represent the data in the DropDownList control. Bind the LinqDataSource control to

the DataSource property of the DropDownList control.

C. Create an XML file in the App_Data directory to represent the data in the DropDownList control. Bind

the XmlDataSource control to the DataSource property of the DropDownList control.

D. Create an XML file in the App_Data directory to represent the data in the DropDownList control. Bind

the ObjectDataSource control to the DataSource property of the DropDownList control.

Answer: C

86. You are creating ASP.NET applications by using the .NET Framework 3.5.

You are evaluating an application design that contains the following requirements:

¡¤All DropDownList controls are dat-bound.

¡¤Updates to the DropDownLis

controls do not require redeployment of the application.

Page 41: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 41 - Test Information Co., Ltd. All rights reserved.

You need to implement the data source control to meet the requirements.

What should you do?

A. Create an enum to represent the data in the DropDownList control. Bind the enum to the DataSource

property of the DropDownList control.

B. Create an enum to represent the data in the DropDownList control. Bind the LinqDataSource control to

the DataSource property of the DropDownList control.

C. Create an XML file in the App_Data directory to represent the data in the DropDownList control. Bind

the XmlDataSource control to the DataSource property of the DropDownList control.

D. Create an XML file in the App_Data directory to represent the data in the DropDownList control. Bind

the ObjectDataSource control to the DataSource property of the DropDownList control.

Answer: C

87. You are creating ASP.NET applications by using the .NET Framework 3.5.

You are designing a Web page that contains a large number of products.

You need to ensure that the following design requirements are met:

¡¤Customers are notified of updates only to those products that they are interested in

¡¤Customers are not asked for any personal identification

¡¤Customers can be notified regardless of their Web browser settings

What should you do?

A. Provide a Web page that displays the updates of all products from the last visited date of the customer

on the site.

B. Provide a link adjacent to each product. Ensure that the link opens a Web site that allows the customer

to sign up for e-mail updates on each product.

C. Provide a Really Simple Syndication (RSS) link adjacent to each product. Base the RSS feed on a

Web service that returns updates for the product.

D. Create a cookie in the Web browser of each customer to track the last visited date for each product

page. Display a message if the product page is updated after the last visit.

Answer: C

88. You are creating ASP.NET applications by using the .NET Framework 3.5.

You are designing a Web page that contains a large number of products.

You need to ensure that the following design requirements are met:

¡¤Customers are notified of updates only to those products that they are interested in

¡¤Customers are not asked for any personal identification

Page 42: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 42 - Test Information Co., Ltd. All rights reserved.

¡¤Customers can be notified regardless of ther Web browser settings.

What should you do?

A. Provide a Web page that displays the updates of all products from the last visited date of the customer

on the site.

B. Provide a link adjacent to each product. Ensure that the link opens a Web site that allows the customer

to sign up for e-mail updates on each product.

C. Provide a Really Simple Syndication (RSS) link adjacent to each product. Base the RSS feed on a

Web service that returns updates for the product.

D. Create a cookie in the Web browser of each customer to track the last visited date for each product

page. Display a message if the product page is updated after the last visit.

Answer: C

89. 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 service

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.

Answer: A

90. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application has the following components:

Page 43: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 43 - Test Information Co., Ltd. All rights reserved.

¡¤A user interface (UI

¡¤Web service

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.

Answer: A

91. You are creating ASP.NET applications by using the .NET Framework 3.5.

A page in the application must communicate with a Web server by using ASP.NET AJAX.

You need to ensure that the Web service returns data in a compact format with as little markup overhead

as possible.

What should you do?

A. Create a SOAP Web service.

B. Create a JSON Web service.

C. Create an XML Web service.

D. Create a WCF binary Web service.

Answer: B

92. You are creating ASP.NET applications by using the .NET Framework 3.5.

A page in the application must communicate with a Web server by using ASP.NET AJAX.

You need to ensure that the Web service returns data in a compact format with as little markup overhead

as possible.

What should you do?

Page 44: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 44 - Test Information Co., Ltd. All rights reserved.

A. Create a SOAP Web service.

B. Create a JSON Web service.

C. Create an XML Web service.

D. Create a WCF binary Web service.

Answer: B

93. 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.

Answer: D

94. 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.

Answer: D

95. You are creating an ASP.NET application by using the .NET Framework 3.5.

You plan to develop the application along with a team of developers, graphic designers, and content

designers.

Some of your team members do not have Microsoft Visual Studio 2008 installed on their computers.

Page 45: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 45 - Test Information Co., Ltd. All rights reserved.

You need to ensure that Visual Studio 2008 can automatically recognize new graphics, content, and other

media files that are added to the project.

What should you do?

A. Create a Web site project. Copy the files that are part of the application to the source folder of the

application.

B. Create a Web site project. Edit the Web.config file of the project to include the files that are part of the

application.

C. Create a Web application project. Copy the files that are part of the application to the source folder of

the application.

D. Create a Web application project. Edit the Web.config file of the project to include the files that are part

of the application.

Answer: A

96. You are creating an ASP.NET application by using the .NET Framework 3.5.

You plan to develop the application along with a team of developers, graphic designers, and content

designers.

Some of your team members do not have Microsoft Visual Studio 2008 installed on their computers.

You need to ensure that Visual Studio 2008 can automatically recognize new graphics, content, and other

media files that are added to the project.

What should you do?

A. Create a Web site project. Copy the files that are part of the application to the source folder of the

application.

B. Create a Web site project. Edit the Web.config file of the project to include the files that are part of the

application.

C. Create a Web application project. Copy the files that are part of the application to the source folder of

the application.

D. Create a Web application project. Edit the Web.config file of the project to include the files that are part

of the application.

Answer: A

97. You are creating an ASP.NET application by using the .NET Framework 3.5.

You plan to deploy the application.

You need to ensure that the names of the generated assemblies conform to the rules specified by the

deployment environment.

Page 46: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 46 - Test Information Co., Ltd. All rights reserved.

What should you do?

A. Create the application as a Web application project. Use the Publish option from the Build menu.

B. Create the application as a Web site project, and rename the generated assemblies to conform to the

rules.

C. Create the application as a Web application project, and set the output assembly name to conform to

the rules.

D. Create the application as a Web site project. Use the aspnet_compiler utility to generate precompiled

assemblies by using fixed names that conform to the rules.

Answer: C

98. You are creating an ASP.NET application by using the .NET Framework 3.5.

You plan to deploy the application.

You need to ensure that the names of the generated assemblies conform to the rules specified by the

deployment environment.

What should you do?

A. Create the application as a Web application project. Use the Publish option from the Build menu.

B. Create the application as a Web site project, and rename the generated assemblies to conform to the

rules.

C. Create the application as a Web application project, and set the output assembly name to conform to

the rules.

D. Create the application as a Web site project. Use the aspnet_compiler utility to generate precompiled

assemblies by using fixed names that conform to the rules.

Answer: C

99. You are creating an ASP.NET application by using the .NET Framework 3.5.

Developers update individual pages frequently.

You need to ensure that when individual pages are updated, the time required to load the other pages to

the Web site remains unaffected.

What should you do?

A. Create the application as a Web site project.

Copy the entire application to the deployment server.

Copy only the updated files to the deployment server when a page is updated.

B. Create the application as a Web application project.

Copy the entire application to the deployment server.

Copy only the updated files to the deployment server when a page is updated.

Page 47: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 47 - Test Information Co., Ltd. All rights reserved.

C. Create the application as a Web site project.

Pre-compile the application by using the updateable option.

Copy only the updated files to the deployment server when a page is updated.

D. Create the application as a Web application project.

Copy only the markup files and compiled assemblies to the deployment server.

Copy only the updated files to the deployment server when a page is updated.

Answer: A

100. You are creating an ASP.NET application by using the .NET Framework 3.5.

Developers update individual pages frequently.

You need to ensure that when individual pages are updated, the time required to load the other pages to

the Web site remains unaffected.

What should you do?

A. Create the application as a Web site project.

Copy the entire application to the deployment server.

Copy only the updated files to the deployment server when a page is updated.

B. Create the application as a Web application project.

Copy the entire application to the deployment server.

Copy only the updated files to the deployment server when a page is updated.

C. Create the application as a Web site project.

Pre-compile the application by using the updateable option.

Copy only the updated files to the deployment server when a page is updated.

D. Create the application as a Web application project.

Copy only the markup files and compiled assemblies to the deployment server.

Copy only the updated files to the deployment server when a page is updated.

Answer: A

101. You are creating ASP.NET applications by using the .NET Framework 3.5.

You plan to upgrade an ASP.NET application from Microsoft Visual Studio 2003 to Microsoft Visual Studio

2008 and Microsoft .NET Framework 1.1 to the .NET Framework 3.5.

You need to ensure that you upgrade the ASP.NET application by using the minimum amount of

development effort.

What should you do?

A. Upgrade the application to a Visual Studio 2008 Web site project.

Page 48: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 48 - Test Information Co., Ltd. All rights reserved.

B. Upgrade the application to a Visual Studio 2008 Web application project.

C. Create a new Visual Studio 2008 Web site project. Add the existing files from the Visual Studio 2003

project to the new project.

D. Create a new Visual Studio 2008 Web application project. Add the existing files from the Visual Studio

2003 Web application project to the new project.

Answer: B

102. You are creating ASP.NET applications by using the .NET Framework 3.5.

You plan to upgrade an ASP.NET application from Microsoft Visual Studio 2003 to Microsoft Visual Studio

2008 and Microsoft .NET Framework 1.1 to the .NET Framework 3.5.

You need to ensure that you upgrade the ASP.NET application by using the minimum amount of

development effort.

What should you do?

A. Upgrade the application to a Visual Studio 2008 Web site project.

B. Upgrade the application to a Visual Studio 2008 Web application project.

C. Create a new Visual Studio 2008 Web site project. Add the existing files from the Visual Studio 2003

project to the new project.

D. Create a new Visual Studio 2008 Web application project. Add the existing files from the Visual Studio

2003 Web application project to the new project.

Answer: B

103. You are creating ASP.NET applications by using the .NET Framework 3.5.

The application occasionally experiences errors that cannot be reproduced on a test environment.

You need to ensure that the application meets the following requirements:

¡¤All unexpected errors are logged

¡¤Logging is configured with a minimum amount of modification to the application code

What should you do?

A. Enable the <customErrors> element in the Web.config file. Set the mode attribute to On.

B. Add an event handler for the Application.Error event to the Global.asax file of the application.

C. Override the base class for all forms in the application to add the TRY/CATCH blocks to all the major

functionalities.

D. Configure the application to redirect to a custom error page by using the <customErrors> element in

the Web.config file of the application.

Answer: B

Page 49: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 49 - Test Information Co., Ltd. All rights reserved.

104. You are creating ASP.NET applications by using the .NET Framework 3.5.

The application occasionally experiences errors that cannot be reproduced on a test environment.

You need to ensure that the application meets the following requirements:

¡¤All unexpected errors are logged

¡¤Logging is configured with a minimum amount of modification to the application code

What should you do?

A. Enable the <customErrors> element in the Web.config file. Set the mode attribute to On.

B. Add an event handler for the Application.Error event to the Global.asax file of the application.

C. Override the base class for all forms in the application to add the TRY/CATCH blocks to all the major

functionalities.

D. Configure the application to redirect to a custom error page by using the <customErrors> element in

the Web.config file of the application.

Answer: B

105. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application must meet the following requirements:

¡¤Create a tracking number to identify errors

¡¤Display the tracking number to the user when an error occurs

You need to ensure that all the exceptions that contain the tracking number are logged. You also need to

ensure that the exceptions to new pages that are added to the application are also logged in the same

manner.

What should you do?

A. Log the exception in the Page_Error event of each page.

Redirect to the customError.aspx page, and pass the tracking number in the query string.

B. Log the exception in the Application_Error event of the Global.asax file.

Redirect to the customError.aspx page, and pass the tracking number in the query string.

C. In the <customError> section of the Web.config file, add the <error statusCode="500"

redirect="customError.aspx" /> element.

In the customError.aspx page, obtain the exception by calling the Server.GetLastError() method and

display the tracking number.

D. In the <customError> section of the Web.config file, add the <error statusCode="500"

redirect="customError.aspx?trackingNumber" /> element.

Log the exception in the Application_Error event of the Global.asax file.

Page 50: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 50 - Test Information Co., Ltd. All rights reserved.

Answer: B

106. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application must meet the following requirements:

¡¤Create a tracking number to identify errors

¡¤Display the tracking number to the user when an error occurs

You need to ensure that all the exceptions that contain the tracking number are logged. You also need to

ensure that the exceptions to new pages that are added to the application are also logged in the same

manner.

What should you do?

A. Log the exception in the Page_Error event of each page.

Redirect to the customError.aspx page, and pass the tracking number in the query string.

B. Log the exception in the Application_Error event of the Global.asax file.

Redirect to the customError.aspx page, and pass the tracking number in the query string.

C. In the <customError> section of the Web.config file, add the <error statusCode="500"

redirect="customError.aspx" /> element.

In the customError.aspx page, obtain the exception by calling the Server.GetLastError() method and

display the tracking number.

D. In the <customError> section of the Web.config file, add the <error statusCode="500"

redirect="customError.aspx?trackingNumber" /> element.

Log the exception in the Application_Error event of the Global.asax file.

Answer: B

107. You are creating ASP.NET applications by using the .NET Framework 3.5.

The application uses the health monitoring events to raise application audit events in the following

scenarios:

¡¤When users log i

¡¤When users change their password

¡¤When users perform other securit-related actions

You need to ensure that the application logs all audit events for all applications on the Web server.

What should you do?

A. Configure the eventMappings node in the Web.config file so that it contains an entry for Success

Audits.

B. Configure the eventMappings node in the Machine.config file so that it contains an entry for Success

Page 51: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 51 - Test Information Co., Ltd. All rights reserved.

Audits.

C. Configure the eventMappings node in the Web.config file so that a single entry for auditing events is

present for All Audits.

D. Configure the eventMappings node in the Machine.config file so that a single entry for auditing events

is present for All Audits.

Answer: D

108. You are creating ASP.NET applications by using the .NET Framework 3.5.

The application uses the health monitoring events to raise application audit events in the following

scenarios:

¡¤When users log i

¡¤When users change their password

¡¤When users perform other securit-related actions

You need to ensure that the application logs all audit events for all applications on the Web server.

What should you do?

A. Configure the eventMappings node in the Web.config file so that it contains an entry for Success

Audits.

B. Configure the eventMappings node in the Machine.config file so that it contains an entry for Success

Audits.

C. Configure the eventMappings node in the Web.config file so that a single entry for auditing events is

present for All Audits.

D. Configure the eventMappings node in the Machine.config file so that a single entry for auditing events

is present for All Audits.

Answer: D

109. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application has performance problems. You plan to collect sample timing information for each page.

You need to ensure that while collecting the information, the following requirements are met:

¡¤Te application remains online.

¡¤The trace output is not visible to end users

¡¤The trace output contains the rendering time for all controls on all the pages

What should you do?

A. Set the Trace.IsEnabled property to true in the OnLoad event of each page.

B. Set the HttpContext.Current.Trace.IsEnabled property to true in the BeginRequest event handler.

Page 52: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 52 - Test Information Co., Ltd. All rights reserved.

C. For the trace element in the Web.config file, set the enabled attribute and the pageOutput attribute to

true.

D. For the trace element in the Web.config file, set the enabled attribute to true and the pageOutput

attribute to false.

Answer: D

110. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application has performance problems. You plan to collect sample timing information for each page.

You need to ensure that while collecting the information, the following requirements are met:

¡¤The application remains online

¡¤The trace output is not visible to end users

¡¤The trace output contains the rendering time for all control

on all the pages.

What should you do?

A. Set the Trace.IsEnabled property to True in the OnLoad event of each page.

B. Set the HttpContext.Current.Trace.IsEnabled property to True in the BeginRequest event handler.

C. For the trace element in the Web.config file, set the enabled attribute and the pageOutput attribute to

True.

D. For the trace element in the Web.config file, set the enabled attribute to True and the pageOutput

attribute to False.

Answer: D

111. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be deployed to a Web server that hosts multiple ASP.NET applications. Each

application will be configured to run in a dedicated application pool.

You need to ensure that the application meets the following requirements:

¡¤Modifies files that are located on a network share

¡¤Ensures that the other applications do not have access to these files

What should you do?

A. Configure the application pool to use a dedicated user account.

Grant access for the share to the user account.

B. Configure the application pool to use the Network Service account.

Grant access for the share to the Network Service account.

C. Configure the Web.config file of the application to enable impersonation.

Set the security on the network share files to allow write access to users of the application.

Page 53: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 53 - Test Information Co., Ltd. All rights reserved.

D. Configure the Web.config file of the application to impersonate the Network Service account.

Set the security on the network share files to allow write access to the Network Service account.

Answer: A

112. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be deployed to a Web server that hosts multiple ASP.NET applications. Each

application will be configured to run in a dedicated application pool.

You need to ensure that the application meets the following requirements:

¡¤Modifies files that are located on a network share

¡¤Ensures that the other applications have no access to these files

What should you do?

A. Configure the application pool to use a dedicated user account.

Grant access for the share to the user account.

B. Configure the application pool to use the Network Service account.

Grant access for the share to the Network Service account.

C. Configure the Web.config file of the application to enable impersonation.

Set the security on the network share files to allow write access to users of the application.

D. Configure the Web.config file of the application to impersonate the Network Service account.

Set the security on the network share files to allow write access to the Network Service account.

Answer: A

113. You are creating an ASP.NET application by using the .NET Framework 3.5.

The individual pages of the application will be frequently updated.

You need to minimize the application startup time after page modifications.

What should you do?

A. Copy all application code to the Bin folder.

B. Copy all application code to the App_Code folder.

C. Use the aspnet_compiler utility to precompile the application along with the pages to be updated.

D. Use the aspnet_compiler utility to precompile the application along with the fixed assembly names.

Answer: D

114. You are creating an ASP.NET application by using the .NET Framework 3.5.

The individual pages of the application will be frequently updated.

You need to minimize the application startup time after page modifications.

Page 54: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 54 - Test Information Co., Ltd. All rights reserved.

What should you do?

A. Copy all application code to the Bin folder.

B. Copy all application code to the App_Code folder.

C. Use the aspnet_compiler utility to precompile the application along with the pages to be updated.

D. Use the aspnet_compiler utility to precompile the application along with the fixed assembly names.

Answer: D

115. You are creating an ASP.NET application by using the .NET Framework 3.5.

You are designing the session-state storage management strategy for the application. The application

supports a Web farm environment.

You need to implement the strategy by setting the storage method for the session-state of the application.

You also need to ensure optimal performance of the application.

What should you do?

A. Store the session-state values in SQL Server.

B. Store the session-state values in the StateServer state provider.

C. Store the session-state values in the memory of the ASP.NET worker process.

D. Store the session-state values in an external file that is shared across the Web servers.

Answer: B

116. You are creating an ASP.NET application by using the .NET Framework 3.5.

You are designing the session-state storage management strategy for the application. The application

supports a Web farm environment.

You need to implement the strategy by setting the storage method for the session-state of the application.

You also need to ensure optimal performance of the application.

What should you do?

A. Store the session-state values in SQL Server.

B. Store the session-state values in the StateServer state provider.

C. Store the session-state values in the memory of the ASP.NET worker process.

D. Store the session-state values in an external file that is shared across the Web servers.

Answer: B

117. You create ASP.NET applications by using the .NET Framework 3.5.

You are designing a strategy for session-state persistence.

You need to ensure that the session data has maximum tolerance to system failures that occur at the

Page 55: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 55 - Test Information Co., Ltd. All rights reserved.

client computer or at the server computer.

What should you do?

A. Persist the session-state values in the memory of the Web server.

B. Persist the session-state values in the cookies at the client computer.

C. Persist the session-state values by using the SQLServer state provider.

D. Persist the session-state values by using the StateServer state provider.

Answer: C

118. You create ASP.NET applications by using the .NET Framework 3.5.

You are designing a strategy for session-state persistence.

You need to ensure that the session data has maximum tolerance to system failures that occur at the

client computer or at the server computer.

What should you do?

A. Persist the session-state values in the memory of the Web server.

B. Persist the session-state values in the cookies at the client computer.

C. Persist the session-state values by using the SQLServer state provider.

D. Persist the session-state values by using the StateServer state provider.

Answer: C

119. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will not be deployed on a Web farm or a Web garden scenario.

The application must meet the following requirements:

¡¤It stores shopping cart data for each user for the entire lifetime of an active sesion.

¡¤The shopping cart data can be stored regardless of browser settings

You need to ensure optimal performance of the application for the shopping cart functionality.

Which storage mechanism should you use to store the shopping cart data?

A. Cookies

B. State server

C. Microsoft SQL Server

D. In-memory of the Web server process

Answer: D

120. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will not be deployed on a Web farm or a Web garden scenario.

The application must meet the following requirements:

Page 56: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 56 - Test Information Co., Ltd. All rights reserved.

¡¤It stores shopping cart data for each user for the entire lifetime of an active session

¡¤The shopping cart data can be stored regardless of browser settings

You need to ensure optimal performance of the application for the shopping cart functionality.

Which storage mechanism should you use to store the shopping cart data?

A. Cookies

B. State server

C. Microsoft SQL Server

D. In-memory of the Web server process

Answer: D

121. You are creating an ASP.NET application by using the .NET Framework 3.5.

Based on the user name and the time of the day, you are required to provide the following features:

¡¤Branding of image

¡¤Control color

¡¤Page layout

You need to provide these features on each page of the application when the page requests are made.

What should you do?

A. In the PreInit event of each page, set the theme and the master page dynamically.

B. In the Page Load event of each page, set the theme and the master page dynamically.

C. Store the feature settings in resource files in the App_LocalResources folder for each user. In the

PreInit event of each page, read from the resource files.

D. Store the feature settings in resource files in the App_LocalResources folder for each user. In the Page

Load event of each page, read from the resource files.

Answer: A

122. You are creating an ASP.NET application by using the .NET Framework 3.5.

Based on the user name and the time of the day, you are required to provide the following features:

¡¤Branding of image

¡¤Cntrol colors

¡¤Page layout

You need to provide these features on each page of the application when the page requests are made.

What should you do?

A. In the PreInit event of each page, set the theme and the master page dynamically.

B. In the Page Load event of each page, set the theme and the master page dynamically.

Page 57: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 57 - Test Information Co., Ltd. All rights reserved.

C. Store the feature settings in resource files in the App_LocalResources folder for each user. In the

PreInit event of each page, read from the resource files.

D. Store the feature settings in resource files in the App_LocalResources folder for each user. In the Page

Load event of each page, read from the resource files.

Answer: A

123. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application must dynamically build the user interface.

You need to initialize the dynamically added controls so that they are accessible during the lifetime of the

page. You also need to ensure that the page code can handle the PostBack events for the controls.

What should you do?

A. Call the Page.FindControl() method in the Load event of the page.

B. Call the Page.ParseControl() method in the Load event of the page.

C. Call the Page.FindControl() method in the PreInit event of the page.

D. Call the Page.ParseControl() method in the PreInit event of the page.

Answer: D

124. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application must dynamically build the user interface.

You need to initialize the dynamically added controls so that they are accessible during the lifetime of the

page. You also need to ensure that the page code can handle the PostBack events for the controls.

What should you do?

A. Call the Page.FindControl() method in the Load event of the page.

B. Call the Page.ParseControl() method in the Load event of the page.

C. Call the Page.FindControl() method in the PreInit event of the page.

D. Call the Page.ParseControl() method in the PreInit event of the page.

Answer: D

125. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses ViewState to store user preferences.

You need to capture the ViewState information to save in a Microsoft SQL Server database.

Which event should you use?

A. Init

B. Load

Page 58: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 58 - Test Information Co., Ltd. All rights reserved.

C. InitComplete

D. SaveStateComplete

Answer: D

126. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses ViewState to store user preferences.

You need to capture the ViewState information to save in a Microsoft SQL Server database.

Which event should you use?

A. Init

B. Load

C. InitComplete

D. SaveStateComplete

Answer: D

127. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application is hosted on Microsoft Windows Server 2008. The server is hosted by an ISP. Only FTP

access is available to the server.

You plan to improve the search relevancy of the pages in the search engines by responding to URLs that

do not have an ASP.NET file extension.

You need to ensure that all pages and static content can be requested.

What should you do?

A. Use an ISAPI filter

B. Use an HttpModule object

C. Use an HttpHandler object

D. Use a Request.PathInfo property

Answer: B

128. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application is hosted on Microsoft Windows Server 2008. The server is hosted by an ISP. Only FTP

access is available to the server.

You plan to improve the search relevancy of the pages in the search engines by responding to URLs that

do not have an ASP.NET file extension.

You need to ensure that all pages and static content can be requested.

What should you do?

Page 59: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 59 - Test Information Co., Ltd. All rights reserved.

A. Use an ISAPI filter

B. Use an HttpModule object

C. Use an HttpHandler object

D. Use a Request.PathInfo property

Answer: B

129. You create an ASP.NET application by using the .NET Framework 3.5.

You plan to implement a mechanism to monitor a service level agreement (SLA) compliance in the

application.

You need to identify a method to enable accurate calculation of the time that all requests take to process.

What should you do?

A. Create and register a custom HttpModule class.

B. Create and register a custom HttpHandler class.

C. Implement a base class for all the Web forms in the application. Calculate the elapsed time between

the Load and Unload events.

D. Implement a base class for all the Web forms in the application. Calculate the elapsed time between

the InitComplete and SaveStateComplete events.

Answer: A

130. You create an ASP.NET application by using the .NET Framework 3.5.

You plan to implement a mechanism to monitor a service level agreement (SLA) compliance in the

application.

You need to identify a method to enable accurate calculation of the time that all requests take to process.

What should you do?

A. Create and register a custom HttpModule class.

B. Create and register a custom HttpHandler class.

C. Implement a base class for all the Web forms in the application. Calculate the elapsed time between

the Load and Unload events.

D. Implement a base class for all the Web forms in the application. Calculate the elapsed time between

the InitComplete and SaveStateComplete events.

Answer: A

131. You create an ASP.NET application by using the .NET Framework 3.5.

The application must be deployed by using the http://www.contoso.com/ URL. The application contains

Page 60: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 60 - Test Information Co., Ltd. All rights reserved.

several Web forms.

You plan to implement Really Simple Syndication (RSS) feeds functionality. The RSS feeds will be

consumed by using the http://www.contoso.com/News.rss URL.

You need to ensure that the application displays the RSS-formatted information when accessing the

specified URL.

What should you do?

A. Create a Web form named News that releases the RSS feeds.

Rename the Web form file by using the .rss extension.

B. Create and register a custom HttpHandler class that releases the RSS feeds.

Associate the HttpHandler class to the .rss extension.

C. Create and register a custom HttpModule class.

Create an event handler for the BeginRequest event that releases the RSS feeds.

D. Create an ASMX Web service component named News.

Create a Web method in the Web service that releases the RSS feeds.

Implement the Web service as a REST service.

Rename the Web service file by using the .rss extension.

Answer: B

132. You create an ASP.NET application by using the .NET Framework 3.5.

The application must be deployed by using the http://www.contoso.com/ URL. The application contains

several Web forms.

You plan to implement Really Simple Syndication (RSS) feeds functionality. The RSS feeds will be

consumed by using the http://www.contoso.com/News.rss URL.

You need to ensure that the application displays the RSS-formatted information when accessing the

specified URL.

What should you do?

A. Create a Web form named News that releases the RSS feeds.

Rename the Web form file by using the .rss extension.

B. Create and register a custom HttpHandler class that releases the RSS feeds.

Associate the HttpHandler class to the .rss extension.

C. Create and register a custom HttpModule class.

Create an event handler for the BeginRequest event that releases the RSS feeds.

D. Create an ASMX Web service component named News.

Create a Web method in the Web service that releases the RSS feeds.

Page 61: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 61 - Test Information Co., Ltd. All rights reserved.

Implement the Web service as a REST service.

Rename the Web service file by using the .rss extension.

Answer: B

133. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be used to share photos across the Internet. Each photo must be available in various

sizes and formats.

The users can access the application from different browsers and operating systems.

You need to develop a download feature that can be easily maintained. You also need to ensure that only

a single version of each photo is stored on the server.

What should you do?

A. Create a User control that converts the original photo to the required format and size.

B. Create an ActiveX control that converts the original photo to the required format and size.

C. Create an HttpHandler class to ascertain the request for the photo download. Process the original

photo for format and size requirements, and then return the processed photo in the response.

D. Create an HttpModule class to ascertain the request for the photo download. Process the original

photo for format and size requirements, and then return the processed photo in the response.

Answer: C

134. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be used to share photos across the Internet. Each photo must be available in various

sizes and formats.

The users can access the application from different browsers and operating systems.

You need to develop a download feature that can be easily maintained. You also need to ensure that only

a single version of each photo is stored on the server.

What should you do?

A. Create a User control that converts the original photo to the required format and size.

B. Create an ActiveX control that converts the original photo to the required format and size.

C. Create an HttpHandler class to ascertain the request for the photo download. Process the original

photo for format and size requirements, and then return the processed photo in the response.

D. Create an HttpModule class to ascertain the request for the photo download. Process the original

photo for format and size requirements, and then return the processed photo in the response.

Answer: C

Page 62: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 62 - Test Information Co., Ltd. All rights reserved.

135. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application logs application-specific information.

You must ensure that the information can be displayed in Microsoft Excel.

What should you do?

A. Use the DefaultTraceListener class.

B. Use the EventLogTraceListener class.

C. Use the XmlWriterTraceListener class.

D. Use the DelimitedListTraceListener class.

Answer: D

136. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application logs application-specific information.

You must ensure that the information can be displayed in Microsoft Excel.

What should you do?

A. Use the DefaultTraceListener class.

B. Use the EventLogTraceListener class.

C. Use the XmlWriterTraceListener class.

D. Use the DelimitedListTraceListener class.

Answer: D

137. You are an ASP.NET application developer.

You plan to debug an ASP.NET application that is developed by using Microsoft .NET Framework 2.0. You

set a breakpoint in the JavaScript code that is stored in an external file. The application fails to stop at the

breakpoint.

You need to debug the application by using Microsoft Visual Studio 2008. You want to achieve this goal by

using the least amount of development effort.

What should you do?

A. Load the ASP.NET page before you set the breakpoint.

B. Enable script debugging in Microsoft Internet Explorer.

C. Change the ASP.NET page to use inline JavaScript code instead of an external file.

D. Change the ASP.NET version of the application domain that hosts the application to ASP.NET 3.5.

Answer: B

138. You are an ASP.NET application developer.

Page 63: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 63 - Test Information Co., Ltd. All rights reserved.

You plan to debug an ASP.NET application that is developed by using Microsoft .NET Framework 2.0. You

set a breakpoint in the JavaScript code that is stored in an external file. The application fails to stop at the

breakpoint.

You need to debug the application by using Microsoft Visual Studio 2008. You want to achieve this goal by

using the least amount of development effort.

What should you do?

A. Load the ASP.NET page before you set the breakpoint.

B. Enable script debugging in Microsoft Internet Explorer.

C. Change the ASP.NET page to use inline JavaScript code instead of an external file.

D. Change the ASP.NET version of the application domain that hosts the application to ASP.NET 3.5.

Answer: B

139. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create an AJAX Web form in the application. You create an ASP.NET AJAX client-component class in

the Web form. The class will be used in a JavaScript function in the Web form.

You plan to debug the JavaScript function.

You need to display all the fields of the AJAX client-component object in the trace console in the Web form

by using the minimum amount of code.

Which method should you use?

A. Sys.Debug.fail

B. Sys.Debug.trace

C. Sys.Debug.assert

D. Sys.Debug.traceDump

Answer: D

140. You are creating an ASP.NET application by using the .NET Framework 3.5.

You create an AJAX Web form in the application. You create an ASP.NET AJAX client-component class in

the Web form. The class will be used in a JavaScript function in the Web form.

You plan to debug the JavaScript function.

You need to display all the fields of the AJAX client-component object in the trace console in the Web form

by using the minimum amount of code.

Which method should you use?

A. Sys.Debug.fail

B. Sys.Debug.trace

Page 64: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 64 - Test Information Co., Ltd. All rights reserved.

C. Sys.Debug.assert

D. Sys.Debug.traceDump

Answer: D

141. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains a Web form that sends requests to four Web services during the Page_Load

event.

You plan to invoke the Web service requests asynchronously.

You need to ensure that the Web form can execute the tasks simultaneously.

What should you do?

A. Invoke the RegisterAsyncTask method.

B. Invoke the SetRenderMethodDelegate method.

C. Invoke the ExecuteRegisteredAsyncTasks method.

D. Invoke the AddOnPreRenderCompleteAsync method.

Answer: A

142. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains a Web form that sends requests to four Web services during the Page_Load

event.

You plan to invoke the Web service requests asynchronously.

You need to ensure that the Web form can execute the tasks simultaneously.

What should you do?

A. Invoke the RegisterAsyncTask method.

B. Invoke the SetRenderMethodDelegate method.

C. Invoke the ExecuteRegisteredAsyncTasks method.

D. Invoke the AddOnPreRenderCompleteAsync method.

Answer: A

143. You are creating an ASP.NET application by using the .NET Framework 3.5.

A Web form in the application needs to call a Web service. You place the following code segment in the

Page_Load event of the form.

AddOnPreRenderCompleteAsync(

new BeginEventHandler(BeginCallWebService),

new EndEventHandler(EndCallWebService)

);

Page 65: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 65 - Test Information Co., Ltd. All rights reserved.

You need to ensure that the BeginCallWebService and EndCallWebService routines are called when the

page is accessed.

What should you do?

A. Move the code segment to the PreInit event handler.

B. Move the code segment to the PreRender event handler.

C. Add the Async="True" attribute to the Page directive.

D. Add the AsyncTimeout="0" attribute to the Page directive.

Answer: C

144. You are creating an ASP.NET application by using the .NET Framework 3.5.

A Web form in the application needs to call a Web service. You place the following code segment in the

Page_Load event of the form.

AddOnPreRenderCompleteAsync(

New BeginEventHandler(BeginCallWebService),

New EndEventHandler(EndCallWebService)

)

You need to ensure that the BeginCallWebService and EndCallWebService routines are called when the

page is accessed.

What should you do?

A. Move the code segment to the PreInit event handler.

B. Move the code segment to the PreRender event handler.

C. Add the Async="True" attribute to the Page directive.

D. Add the AsyncTimeout="0" attribute to the Page directive.

Answer: C

145. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application must use an existing Microsoft SQL Server database that stores user names and

passwords in the same table. You are not allowed to change the database schema.

You need to ensure that the application can use the Login, LoginView, LoginStatus, LoginName, and

PasswordRecovery controls to manage user data.

What should you do?

A. Use the SqlProfileProvider class.

B. Use the SqlMembershipProvider class.

C. Implement a custom profile provider.

Page 66: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 66 - Test Information Co., Ltd. All rights reserved.

D. Implement a custom membership provider.

Answer: D

146. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application must use an existing Microsoft SQL Server database that stores user names and

passwords in the same table. You are not allowed to change the database schema.

You need to ensure that the application can use the Login, LoginView, LoginStatus, LoginName, and

PasswordRecovery controls to manage user data.

What should you do?

A. Use the SqlProfileProvider class.

B. Use the SqlMembershipProvider class.

C. Implement a custom profile provider.

D. Implement a custom membership provider.

Answer: D

147. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be accessed by users in remote locations over the Internet. You plan to use ASP.NET

role management.

You need to ensure that any authorization information cached on remote client computers is as secure as

possible.

What should you do?

A. Use the System.Configuration.RsaProtectedConfigurationProvider class.

B. Use the System.Configuration.DpapiProtectedConfigurationProvider class.

C. Set the cookieProtection attribute to Validation in the roleManager element of the Web.config file.

D. Set the cookieProtection attribute to Encryption in the roleManager element of the Web.config file.

Answer: D

148. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be accessed by users in remote locations over the Internet. You plan to use ASP.NET

role management.

You need to ensure that any authorization information cached on remote client computers is as secure as

possible.

What should you do?

A. Use the System.Configuration.RsaProtectedConfigurationProvider class.

Page 67: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 67 - Test Information Co., Ltd. All rights reserved.

B. Use the System.Configuration.DpapiProtectedConfigurationProvider class.

C. Set the cookieProtection attribute to Validation in the roleManager element of the Web.config file.

D. Set the cookieProtection attribute to Encryption in the roleManager element of the Web.config file.

Answer: D

149. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses Forms authentication. Your company uses Active Directory.

You plan to modify the application to enable users to use their existing Active Directory account to access

the application through the Internet.

You need to ensure that the application is modified by using the minimum amount of user interface

changes, cost, and development effort.

What should you do?

A. Change the membership provider to ActiveDirectoryMembershipProvider.

B. Change the application to use Windows authentication instead of Forms authentication.

C. Create a custom membership provider that has access to the corporate Active Directory.

D. Remove Forms authentication and install the Active Directory Federation Services 1.1 component.

Answer: A

150. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses Forms authentication. Your company uses Active Directory.

You plan to modify the application to enable users to use their existing Active Directory account to access

the application through the Internet.

You need to ensure that the application is modified by using the minimum amount of user interface

changes, cost, and development effort.

What should you do?

A. Change the membership provider to ActiveDirectoryMembershipProvider.

B. Change the application to use Windows authentication instead of Forms authentication.

C. Create a custom membership provider that has access to the corporate Active Directory.

D. Remove Forms authentication and install the Active Directory Federation Services 1.1 component.

Answer: A

151. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be deployed to an intranet server in your organization.

You need to ensure that the application meets the following requirements:

¡¤Users must be able to log on to the application by using their Active Directory credentials

Page 68: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 68 - Test Information Co., Ltd. All rights reserved.

¡¤Each page i n t he appli caion must display controls for user name and password when accessed by an

unauthenticated user.

What should you do?

A. Use Windows authentication.

Enable impersonation.

B. Use Windows authentication.

Disable impersonation.

C. Use Forms authentication.

use the SqlMembershipProvider class.

D. Use Forms authentication.

use the ActiveDirectoryMembershipProvider class.

Answer: D

152. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be deployed to an intranet server in your organization.

You need to ensure that the application meets the following requirements:

¡¤Users must be able to log on to the application by using their Active Directory credentials

¡¤Each page i n t he appli cati on must di spl ay contr ol s f or user na m

and password when accessed by an

unauthenticated user.

What should you do?

A. Use Windows authentication.

Enable impersonation.

B. Use Windows authentication.

Disable impersonation.

C. Use Forms authentication.

use the SqlMembershipProvider class.

D. Use Forms authentication.

use the ActiveDirectoryMembershipProvider class.

Answer: D

153. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application provides an online shopping Web site. The Web site allows users to purchase and add

items to a shopping cart.

The application has the following requirements:

Page 69: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 69 - Test Information Co., Ltd. All rights reserved.

¡¤Items in the cart must not get lost if a user closes the browser

¡¤ User s who have si gned i n t o t he Web sit e can r etri eve t he li st of it e ms t hat t hey have added t o t he cart

from any computer.

¡¤ User s who have not si gned i n t o t he Web sit e can r etri eve t hei r cart fr o m t he sa me co mput er t hat t hey

have used to add the items to the cart.

You need to implement a solution to store the state of the shopping cart.

What should you do?

A. Store the shopping cart in a persistent cookie.

B. Store the shopping cart in a user profile property.

C. Store the shopping cart in the ASP.NET session state.

D. Store the shopping cart in an ASP.NET cache item that uses a custom expiration policy.

Answer: B

154. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application provides an online shopping Web site. The Web site allows users to purchase and add

items to a shopping cart.

The application has the following requirements:

¡¤Items in the cart must not get lost if a user closes the browser

¡¤ User s who have si gned i n t o t he Web sit e can r etri eve t he li st of it e ms t hat t hey have added t o t he cart

from any computer.

¡¤ User s who have not si gned i n t o t he Web sit e can r etri ee their cart from the same computer that they

have used to add the items to the cart.

You need to implement a solution to store the state of the shopping cart.

What should you do?

A. Store the shopping cart in a persistent cookie.

B. Store the shopping cart in a user profile property.

C. Store the shopping cart in the ASP.NET session state.

D. Store the shopping cart in an ASP.NET cache item that uses a custom expiration policy.

Answer: B

155. 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.

Page 70: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 70 - Test Information Co., Ltd. All rights reserved.

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" />

Answer: B

156. 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" />

Page 71: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 71 - Test Information Co., Ltd. All rights reserved.

D. In the application root directory, add the following code fragment to the Web.config file.

<allow user="Siteuser; Premium\Subscriber" />

Answer: B

157. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application has several subdirectories under the application root directory. Only the users who belong

to an approved role can access the contents of the subdirectory.

The user authorizations for the subdirectories must be stored in a single Web.config file in the application

root directory.

You need to ensure that the node encloses the approved roles and specifies the appropriate subdirectory.

Which node should you use?

A. <location>

B. <clientTarget>

C. <authorization>

D. <authentication>

Answer: A

158. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application has several subdirectories under the application root directory. Only the users who belong

to an approved role can access the contents of the subdirectory.

The user authorizations for the subdirectories must be stored in a single Web.config file in the application

root directory.

You need to ensure that the node encloses the approved roles and specifies the appropriate subdirectory.

Which node should you use?

A. <location>

B. <clientTarget>

C. <authorization>

D. <authentication>

Answer: A

159. You are creating an ASP.NET application by using the .NET Framework 3.5.

User accounts in Active Directory are configured to provide access to resources.

You need to ensure that users can access the resources through the application.

Which XML fragment should you use in the Web.config file?

Page 72: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 72 - Test Information Co., Ltd. All rights reserved.

A. <authentication mode="Forms" />

<identity impersonate="false" />

B. <authentication mode="Forms" />

<identity impersonate="true" />

C. <authentication mode="Windows" />

<identity impersonate="false" />

D. <authentication mode="Windows" />

<identity impersonate="true" />

Answer: D

160. You are creating an ASP.NET application by using the .NET Framework 3.5.

User accounts in Active Directory are configured to provide access to resources.

You need to ensure that users can access the resources through the application.

Which XML fragment should you use in the Web.config file?

A. <authentication mode="Forms" />

<identity impersonate="false" />

B. <authentication mode="Forms" />

<identity impersonate="true" />

C. <authentication mode="Windows" />

<identity impersonate="false" />

D. <authentication mode="Windows" />

<identity impersonate="true" />

Answer: D

161. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be accessed by Internet users. You plan to enable users to authenticate from the

client-side script.

You add the following code fragment in the Web.config file of the application.

<system.web.extensions>

<scripting>

<webServices>

<authenticationService enabled="true" />

</webServices>

</scripting>

Page 73: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 73 - Test Information Co., Ltd. All rights reserved.

</system.web.extensions>

You need to configure the application to ensure user credentials are validated against Active Directory by

using the client-side script.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Configure the application to use the ActiveDirectoryMembershipProvider class.

B. Configure the application to use the ClientWindowsAuthenticationMembershipProvider class.

C. Add the following code fragment to the Web.config file of the application.

<authentication mode="None" />

D. Add the following code fragment to the Web.config file of the application.

<authentication mode="Forms" />

E. Add the following code fragment to the Web.config file of the application.

<authentication mode="Windows" />

Answer: AD

162. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will be accessed by Internet users. You plan to enable users to authenticate from the

client-side script.

You add the following code fragment in the Web.config file of the application.

<system.web.extensions>

<scripting>

<webServices>

<authenticationService enabled="true" />

</webServices>

</scripting>

</system.web.extensions>

You need to configure the application to ensure user credentials are validated against Active Directory by

using the client-side script.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Configure the application to use the ActiveDirectoryMembershipProvider class.

B. Configure the application to use the ClientWindowsAuthenticationMembershipProvider class.

C. Add the following code fragment to the Web.config file of the application.

<authentication mode="None" />

D. Add the following code fragment to the Web.config file of the application.

<authentication mode="Forms" />

Page 74: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 74 - Test Information Co., Ltd. All rights reserved.

E. Add the following code fragment to the Web.config file of the application.

<authentication mode="Windows" />

Answer: AD

163. You are maintaining an ASP.NET application by using the .NET Framework 3.5.

The application uses Forms authentication.

Security testing of the application reveals that users can access the sessions of other users on different

computers.

You need to configure the application to eliminate the vulnerability.

What should you do?

A. Add the following element to the Web.config file.

<forms cookieless="UseUri">

B. Add the following element to the Web.config file.

<forms cookieless="UseCookies">

C. Add the following element to the Web.config file.

<forms requireSSL="false">

D. Add the following element to the Web.config file.

<forms requireSSL="true">

Answer: B

164. You are maintaining an ASP.NET application by using the .NET Framework 3.5.

The application uses Forms authentication.

Security testing of the application reveals that users can access the sessions of other users on different

computers.

You need to configure the application to eliminate the vulnerability.

What should you do?

A. Add the following element to the Web.config file.

<forms cookieless="UseUri">

B. Add the following element to the Web.config file.

<forms cookieless="UseCookies">

C. Add the following element to the Web.config file.

<forms requireSSL="false">

D. Add the following element to the Web.config file.

<forms requireSSL="true">

Page 75: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 75 - Test Information Co., Ltd. All rights reserved.

Answer: B

165. You are creating an ASP. NET application by using the .NET Framework 3.5.

The application stores HTML content in a database. The HTML content is provided by multiple external

sources.

You need to ensure that any script code stored in the database cannot be executed when displayed in the

client browser.

Which method should you use?

A. Server.HtmlDecode()

B. System.Web.HttpUtility.UrlEncode()

C. System.Web.HttpUtility.HtmlEncode()

D. System.Web.HttpUtility.HtmlAttributeEncode()

Answer: C

166. You are creating an ASP. NET application by using the .NET Framework 3.5.

The application stores HTML content in a database. The HTML content is provided by multiple external

sources.

You need to ensure that any script code stored in the database cannot be executed when displayed in the

client browser.

Which method should you use?

A. Server.HtmlDecode()

B. System.Web.HttpUtility.UrlEncode()

C. System.Web.HttpUtility.HtmlEncode()

D. System.Web.HttpUtility.HtmlAttributeEncode()

Answer: C

167. You are creating an ASP.NET application by using the .NET Framework 3.5.

You deploy the application to a remote server. The application contains form submissions, QueryString

parameters, cookies, and ViewState properties. The application connects to a database.

You need to ensure that SQL injection attacks are minimized.

Which three actions should you perform? (Each correct answer presents part of the solution. Choose

three.)

A. Constrain and sanitize user input.

B. Use parameterized SQL statements.

Page 76: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 76 - Test Information Co., Ltd. All rights reserved.

C. Use a least-privileged database account.

D. Display error information so that errors can be resolved.

E. Convert all stored procedures to dynamic SQL and use the sp_executesql system stored procedure.

Answer: ABC

168. You are creating an ASP.NET application by using the .NET Framework 3.5.

You deploy the application to a remote server. The application contains form submissions, QueryString

parameters, cookies, and ViewState properties. The application connects to a database.

You need to ensure that SQL injection attacks are minimized.

Which three actions should you perform? (Each correct answer presents part of the solution. Choose

three.)

A. Constrain and sanitize user input.

B. Use parameterized SQL statements.

C. Use a least-privileged database account.

D. Display error information so that errors can be resolved.

E. Convert all stored procedures to dynamic SQL and use the sp_executesql system stored procedure.

Answer: ABC

169. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will allow users to enter HTML content into a Web form. The HTML content will be stored

in a Microsoft SQL Server database.

You need to ensure that the content can be posted to the page. You also need to ensure that potentially

harmful script cannot be stored in the database.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Use the Server.HtmlEncode method when saving the text to the database.

B. Use the Server.HtmlDecode method when saving the text to the database.

C. Set the ValidateRequest attribute of the @Page directive to true.

D. Set the ValidateRequest attribute of the @Page directive to false.

E. Set the validateRequest attribute of the pages element to true in the Web.config file.

Answer: AD

170. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will allow users to enter HTML content into a Web form. The HTML content will be stored

in a Microsoft SQL Server database.

You need to ensure that the content can be posted to the page. You also need to ensure that potentially

Page 77: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 77 - Test Information Co., Ltd. All rights reserved.

harmful script cannot be stored in the database.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Use the Server.HtmlEncode method when saving the text to the database.

B. Use the Server.HtmlDecode method when saving the text to the database.

C. Set the ValidateRequest attribute of the @Page directive to True.

D. Set the ValidateRequest attribute of the @Page directive to False.

E. Set the validateRequest attribute of the pages element to True in the Web.config file.

Answer: AD

171. You are creating ASP.NET applications by using the .NET Framework 3.5.

Your company hosts a Web site. The Web site provides an online community and displays personal

information of the site members. An e-mail account that is used as the user name is mandatory to register

with the online community.

Only registered users of the site can view the personal information of other members.

You need to ensure that unauthorized, automated scripts or bots are not allowed to perform the following

tasks:

¡¤Register with the site

¡¤Access the personal information of the members

Which two defensive coding techniques should you use? (Each correct answer presents part of the

solution. Choose two.)

A. Wrap all personal information of the members within DIV controls that will toggle to show or hide.

B. Send confirmation e-mail messages to all new registered users. Deny new user accounts access to the

site until the user responds to the e-mail message.

C. Store the IP address that was last logged on by the member. Pre-populate the login form by using the

credentials of the member if the IP address is the same.

D. Implement a Completely Automated Public Turing Tests to Tell Computers and Humans Apart

(CAPTCHA) image control during the registration and login process.

E. Instruct users to create passwords that include upper and lower case letters, a minimum of one

numerical digit or special character, and words that are listed in the dictionary.

Answer: BD

172. You are creating ASP.NET applications by using the .NET Framework 3.5.

Your company hosts a Web site. The Web site provides an online community and displays personal

information of the site members. An e-mail account that is used as the user name is mandatory to register

Page 78: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 78 - Test Information Co., Ltd. All rights reserved.

with the online community.

Only registered users of the site can view the personal information of other members.

You need to ensure that unauthorized, automated scripts or bots are not allowed to perform the following

tasks:

¡¤Register with the site

¡¤Access the personal information of the members

Which two defensive coding techniques should you use? (Each correct answer presents part of the

solution. Choose two.)

A. Wrap all personal information of the members within DIV controls that will toggle to show or hide.

B. Send confirmation e-mail messages to all new registered users. Deny new user accounts access to the

site until the user responds to the e-mail message.

C. Store the IP address that was last logged on by the member. Pre-populate the login form by using the

credentials of the member if the IP address is the same.

D. Implement a Completely Automated Public Turing Tests to Tell Computers and Humans Apart

(CAPTCHA) image control during the registration and login process.

E. Instruct users to create passwords that include upper and lower case letters, a minimum of one

numerical digit or special character, and words that are listed in the dictionary.

Answer: BD

173. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses the Forms authentication mode. Each folder in the application contains confidential

Microsoft Excel files.

You need to ensure that bots are not allowed to access the folders in the application.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Map the Excel files to the ASP.NET ISAPI filter.

B. Add a <deny> element to the <authorization> element in the Web.config file.

C. Set the authorization node of the lockElements attribute value in the Web.config file.

D. Implement a Robots.txt file in the root directory of the application.

E. Implement a Completely Automated Public Turing Tests to Tell Computers and Humans Apart

(CAPTCHA) image control on each page of the application.

Answer: AB

174. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application uses the Forms authentication mode. Each folder in the application contains confidential

Page 79: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 79 - Test Information Co., Ltd. All rights reserved.

Microsoft Excel files.

You need to ensure that bots are not allowed to access the folders in the application.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A. Map the Excel files to the ASP.NET ISAPI filter.

B. Add a <deny> element to the <authorization> element in the Web.config file.

C. Set the authorization node of the lockElements attribute value in the Web.config file.

D. Implement a Robots.txt file in the root directory of the application.

E. Implement a Completely Automated Public Turing Tests to Tell Computers and Humans Apart

(CAPTCHA) image control on each page of the application.

Answer: AB

175. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores user names and passwords in the database.

You need to ensure that the passwords are encrypted and cannot be decrypted.

What should you do?

A. Encrypt passwords by using the Rijndael algorithm before the passwords are stored in the database.

B. Encrypt passwords by using the Secure Hash algorithm before the passwords are stored in the

database.

C. Encrypt passwords by using the Triple Data Encryption Standard algorithm before the passwords are

stored in the database.

D. Create an instance of the System.Security.SecureString class to hold passwords before the passwords

are stored in the database.

Answer: B

176. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores user names and passwords in the database.

You need to ensure that the passwords are encrypted and cannot be decrypted.

What should you do?

A. Encrypt passwords by using the Rijndael algorithm before the passwords are stored in the database.

B. Encrypt passwords by using the Secure Hash algorithm before the passwords are stored in the

database.

C. Encrypt passwords by using the Triple Data Encryption Standard algorithm before the passwords are

stored in the database.

D. Create an instance of the System.Security.SecureString class to hold passwords before the passwords

Page 80: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 80 - Test Information Co., Ltd. All rights reserved.

are stored in the database.

Answer: B

177. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application connects to a Web service over the Internet. The application uses and stores

authentication cookies.

You need to ensure that transmission and storage of cookies is as secure as possible.

What should you do?

A. Modify the authentication cookie time-out to be as short as possible.

B. Use a secure HTTP connection for any request that involves the transmission of an authentication

cookie.

C. Store the IP address of the client computer in a database each time a user logs on to the application.

Reject requests that originate from IP addresses which do not match the stored IP address.

D. Include the IP address of the client computer in the encrypted authentication cookie each time a user

logs on to the application. Reject requests that originate from IP addresses which do not match the

encrypted IP address.

Answer: B

178. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application connects to a Web service over the Internet. The application uses and stores

authentication cookies.

You need to ensure that transmission and storage of cookies is as secure as possible.

What should you do?

A. Modify the authentication cookie time-out to be as short as possible.

B. Use a secure HTTP connection for any request that involves the transmission of an authentication

cookie.

C. Store the IP address of the client computer in a database each time a user logs on to the application.

Reject requests that originate from IP addresses which do not match the stored IP address.

D. Include the IP address of the client computer in the encrypted authentication cookie each time a user

logs on to the application. Reject requests that originate from IP addresses which do not match the

encrypted IP address.

Answer: B

179. You are creating an ASP.NET application by using the .NET Framework 3.5.

Page 81: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 81 - Test Information Co., Ltd. All rights reserved.

The application is configured to run by using a specific set of user credentials. Other applications are not

allowed to use these user credentials. The application uses asymmetric encryption to encrypt and decrypt

messages to other servers.

You need to protect the private key used to encrypt and decrypt messages from being accessed by other

users or applications on the same server.

What should you do?

A. Store the private key in the App_Data directory.

B. Use the System.Security.SecureString class.

C. Use the System.Security.ProtectedData class.

D. Use the Triple Data Encryption Standard algorithm to encrypt the private key before storing it in a file.

Answer: C

180. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores and retrieves sensitive data in a Microsoft SQL Server 2008 database. The

database is accessed by multiple applications.

You need to ensure that other applications that access the database are unable to view any sensitive data

that is stored by the application.

What should you do?

A. Enable the Transparent Data encryption for the SQL Server database.

B. Enable the secure sockets layer encryption for the SQL Server connections.

C. Encrypt sensitive data by using the Secure Hash algorithm before storing it in the database.

D. Encrypt sensitive data by using the Advanced Encryption Standard algorithm before storing it in the

database.

Answer: D

181. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores and retrieves sensitive data in a Microsoft SQL Server 2008 database. The

database is accessed by multiple applications.

You need to ensure that other applications that access the database are unable to view any sensitive data

that is stored by the application.

What should you do?

A. Enable the Transparent Data encryption for the SQL Server database.

B. Enable the secure sockets layer encryption for the SQL Server connections.

C. Encrypt sensitive data by using the Secure Hash algorithm before storing it in the database.

Page 82: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 82 - Test Information Co., Ltd. All rights reserved.

D. Encrypt sensitive data by using the Advanced Encryption Standard algorithm before storing it in the

database.

Answer: D

182. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores sensitive profile data in a Microsoft SQL Server 2008 database.

You need to ensure that no profile data is stored in clear text.

What should you do?

A. Enable the secure sockets layer encryption for the SQL Server connections.

B. Use the aspnet_regiis tool to encrypt the connection string that is used to connect to the SQL Server

2008 database.

C. Create a strongly typed custom Profile class. In the Profile class, encrypt the provided information

before storing it in the database.

D. Create a custom profile provider. In the custom provider, ensure that the provided information is

encrypted before storing it in the database.

Answer: D

183. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application stores sensitive profile data in a Microsoft SQL Server 2008 database.

You need to ensure that no profile data is stored in clear text.

What should you do?

A. Enable the secure sockets layer encryption for the SQL Server connections.

B. Use the aspnet_regiis tool to encrypt the connection string that is used to connect to the SQL Server

2008 database.

C. Create a strongly typed custom Profile class. In the Profile class, encrypt the provided information

before storing it in the database.

D. Create a custom profile provider. In the custom provider, ensure that the provided information is

encrypted before storing it in the database.

Answer: D

184. You are creating an ASP.NET application by using the .NET Framework 3.5.

The application is configured to run by using a specific set of user credentials. Other applications are not

allowed to use these user credentials. The application uses asymmetric encryption to encrypt and decrypt

messages to other servers.

Page 83: 50092727-70-564-P1 (KOTest, 184 frågor)

| English | Chinese | Japan | Korean | - 83 - Test Information Co., Ltd. All rights reserved.

You need to protect the private key used to encrypt and decrypt messages from being accessed by other

users or applications on the same server.

What should you do?

A. Store the private key in the App_Data directory.

B. Use the System.Security.SecureString class.

C. Use the System.Security.ProtectedData class.

D. Use the Triple Data Encryption Standard algorithm to encrypt the private key before storing it in a file.

Answer: C

Page 84: 50092727-70-564-P1 (KOTest, 184 frågor)

We was founded in 2006. The safer,easier way to help you pass any IT Certification exams . We provide high quality IT Certification exams practice questions and answers(Q&A). And help you pass any IT Certification exams at the first try.

Customer Support : [email protected]