Q1. You are designing an
ASP.NET web application that allows members of the Administrators
role
to edit content by using a HyperLink control on each page named EditHyper
Link. You do not want
nonadministrators to discover the location of the administration
pages.
Which approach should you recommend?
A. In
the ASPX page, set the EditHyperLink.Visible property to True. In
the JavaScript
window.onload
event
handler, set the link’s style.display property to none if the
user
is not a member of the Administrators role.
B. In
the ASPX page, set the EditHyperLink.Visible property to False.
In the JavaScript
window.onload
event
handler, set the link’s style.display property to block if the
user
is a member of the Administrators role.
C. In
the ASPX page, set the EditHyperLink.Visible property to False.
In the Page.Load
event
handler, set the HyperLink.Visible property to True if the user
is a member of
the
Administrators role.`
D. In
the ASPX page, set the EditHyperLink.Visible property to False.
In the EditHyper
Link.Click
event
handler, set the HyperLink.Visible property to False if the user
is not
a
member of the Administrators role.
Answer : C
Q2. You are designing an
ASP.NET web application that provisions virtual machines for a
testing
environment. Users can provision from 1 to 10 virtual machines at a time, and
each
virtual machine provision might take up to 60 seconds. For security reasons,
the
server
hosting the virtual machines allows provisioning requests only from the web
server.
You need to design the application to keep users notified of the provisioning
progress.
Which approach should you recommend?
A. On
the server, start asynchronous processes to provision each virtual machine. On
the
client, use JavaScript to query the server every five seconds for a status
update.
B. On
the server, synchronously provision each virtual machine. When complete,
return
a status update to the user.
C. On
the server, calculate the approximate total provisioning time. On the client,
use
JavaScript
to connect to the server hosting the virtual machines and initiate the
provisioning.
D. On
the client, use JavaScript to launch a separate asynchronous process for each
virtual
machine to be provisioned. Within each process, request a page from the
web
server that provisions a virtual machine.
Answer
: A
Q3. You are creating a new
website for an enterprise organization. The enterprise has
a
quality assurance team that requires developers to use test-driven development.
Additionally,
the application architecture must partition according to the principle of
SoC.
Which template should you use?
A. Use
the ASP.NET 4.0 web application project template.
B. Use
the ASP.NET MVC 2 web application project template.
C. Use
the Silverlight application project template.
D. Create
an ASP.NET 4.0 website.
Answer:
B
Q4. You need to design a
physical architecture to meet these requirements:
The
website will remain online if the web server is restarted.
The
database server will not be affected by a denial-of-service attack against the
web
server.You must minimize hardware costs.How many servers will you need?
A. One
B. Two
C. Three
D. Four
Answer:B
Q5. You need to design a
physical architecture to meet these requirements:
■■ The website must be able to
serve six requests per minute.
■■ The database server will
store 2 TB of data.
■■ You must minimize hardware
costs.
How
many servers will you need?
A. One
B. Two
C. Three
D. Four
Answer:
A
Q6. You are designing a
three-tier web application. You need to choose the method of
communication
between the web and application layers to meet these requirements:
■■ The application server will
use the .NET Framework 4.0.
■■ The application server must
be physically isolated.
■■ The application server will
be located on the same high-speed LAN as the web
server
and database servers.
■■ The web server will be
located behind a firewall.
■■ The communications will be
two-way.
■■ The communications must be
as efficient as possible.
Which
WCF binding type will you use?
A. NetTcpBinding
B. NetNamedPipesBinding
C. WsHttpBinding
D. WSDualHttpBinding
Answer:
A
Q7. You are designing an
ASP.NET web application that allows end users to chat live with
customer
support when they click a Button control. At times, it might take several
minutes
for customer support to respond to a user. You need to design the application
to
be responsive to users, even when customer support cannot immediately reply.
You
need to support a wide variety of browsers, including browsers built into
mobile
devices.
Which approach should you recommend?
A. In
the Button.Click event handler, return a webpage that contains a
real-time chat
client
implemented by using Flash. Configure the Silverlight client to communicate
directly
with customer support.
B. In
the Button.Click event handler, return a webpage that contains a
real-time chat
client
implemented by using Silverlight. Configure the Silverlight client to
communicate
directly
with customer support.
C. In
the Button.Click event handler, connect to the customer support chat
client. Add
the
response to the webpage.
D. In
the Button.Click event handler, return a webpage that contains
client-side JavaScript
code
that connects to a web service running on the server to send messages
from
the user and retrieve responses from customer support.
Answer:C
Q8. You are designing the
client-side component of web application with the following
requirements:
■■ Retrieve data from a web
service, and display it in a <div> element on the webpage.
■■ Work with all common
browsers.
■■ Do not require client-side
installation.
Which
two technologies should you recommend? (Choose all that apply. Each answer
forms
a complete solution.)
A. Silverlight
B. jQuery
C. VBScript
D. Microsoft
AJAX
Answer:B,D
Q9. You are designing a 3D game
that will run in client browsers. The platform you choose
must
be able to work in all common browsers and must support GPU acceleration.
Which
technology should you choose?
A. Silverlight
B. jQuery
C. VBScript
D. Microsoft
AJAX
Aswer:A
Q10. You are creating a new web
application. You must meet these requirements:
■■ Use the Login control
to allow users to authenticate.
■■ Allow a web designer to
configure the appearance of all controls using classes in
CSS
style sheets.
How
should you configure the Login control? (Choose two. Each answer forms
part of
the
complete solution.)
A. Define
the CssClass property.
B. Set
the RenderOuterTable property to true.
C. Set
the RenderOuterTable property to false.
D. Define
the LoginButtonType property.
Answer:A,C
Q11. You are planning to write
client-side JavaScript that must retrieve and display a string
value
returned by a server-side method. You want the messages sent between the client
and
server to be as small as possible. Which approach should you choose?
A. Create
a partial class.
B. Use
an UpdateProgress control.
C. Use
an UpdatePanel control.
D. Use
a Microsoft AJAX page method.
Answer:D
Q12. You are creating a view for
an MVC application. You need to create a non-standard
HTML
control that should be rendered on the server. You must minimize the amount
of
client and server resources used as well as your development time. Which
approach
should
you choose?
A. Use
the jQuery library to dynamically add the HTML control to the document
object
model.
B. Create
an HtmlHelper extension.
C. Create
a custom server control.
D. Create
a custom Web Part.
Answer:B
Q13. You are designing a web
application that will be deployed across ten servers in a web
farm.
The servers will be load-balanced using NLBS. Sessions must be maintained if a
user
is directed to a different server mid-session. Which session type should you
use?
(Choose
all that apply. Each answer forms a complete solution.)
A. InProc
session state
B. State
server session state
C. SQL
Server session state
D. Cookieless
session state
Answer:B,C
Q14. You recently deployed an
ASP.NET web application. Although the application performs
well
on the intranet, mobile users complain that pages take too long to load.
You
investigate the problem and determine that the size of the view state is very
large,
increasing
page size. How can you solve the problem? (Choose all that apply. Each
answer
forms part of the complete solution.)
A. Create
a custom PageAdapter class that uses SessionStatePersister.
B. Create
a custom PageAdapter class that uses control state.
C. Disable
view state.
D. Use
dynamic data controls.
Answer : A,C
Q15. Recently, systems administrators
scaled a web application you designed from one
web
server to three web servers. Requests are distributed between the servers using
round-robin
DNS. Since the upgrade, the administrators have noticed that sessions are
reset
when a user request is sent to a different server. How can you solve the
problem?
(Choose
all that apply. Each answer forms part of the complete solution.)
A. Use
the StateServer session state mode.
B. Use
cookieless session state.
C. Create
a custom PageStatePersister.
D. Configure
all web servers with the same machine key
Answer:A,D
Q16. You are creating an
intranet web application that dozens of different organizations will
deploy.
You need to provide a way for web designers to specify custom logos, fonts,
and
colors for all pages in the application. You do not want the web designers to
need
any
knowledge of ASP.NET. What should you do?
A. Specify
all styles in the App_Themes\Default\Skinfile.skin file. Set the master page’s
Theme
property
to Default.
B. Specify
all styles in the App_Themes\Default\Skinfile.skin file. Set each page’s
Theme
property
to Default.
C. Specify
all styles in the Styles\Site.css file. Link to the file in your master page.
D. Define
settings in the Web.config file. In the Page_Load method, read and apply
the
settings
Answer:C
.
Q17. You are creating a web
application that allows users to select one of four different
themes.
You have defined each of the themes in the App_Themes folder. How can you
apply
the correct theme to a page?
A. Switch
to the appropriate theme in the master page’s Load method.
B. Switch
to the appropriate theme in each content page’s PreRender method.
C. In
the master page, override the Page_Load method and change the style
sheet
reference
in the <head> element to the appropriate theme.
D. In
each content page, override the Page_Load method and change the style
sheet
reference
in the <head> element to the appropriate theme.
Answer:B
Q18. You are designing a large
MVC application. The application will be divided into five
areas:
home, products, services, support, and investor relations. Every page on the
site
must have a logo at the top of the page and copyright information at the bottom
of
the page. Within each section, developers must define navigation links that
will be
used
on every page in that section. How should you define the application structure
to
maximize
consistency and minimize development time?
A. Define
the logo and copyright footer in a master page. Define the navigation links
in
nested master pages within each area.
B. Create
custom user controls for the logo and copyright footer. Create master
pages
within each area that contain the custom user controls and define the
navigation
links.
C. Define
the logo and copyright footer in a master page. Derive master pages containing
the
navigation links for each area from the root master page.
Objective 2.1: Design the Site Structure Chapter 2 65
D. Define
the logo and copyright footer in a master page. Apply area-specific themes
to
define the navigation links.
Answer:A
Q19. You are designing a web
application that includes two different interfaces: desktop and
mobile.
Which object would you examine to change the layout at runtime for mobile
clients?
A. Request.Browser
B. Request.HttpMethod
C. Response.IsClientConnected
D. Response.Status
Answer:A
Q20. Recently, your IT department began
issuing users a new type of mobile device. An
existing
web application does not detect the device as a mobile device. How can you
allow
the device to be properly detected without changing application code?
A. Alter
the Request.Browser object.
B. Add
a .browser file.
C. Add
a new user agent to the Web.config file.
D. Restart
the web serve
Answer:B.
Q21. You are designing a web application
that provides separate interfaces for desktop and
mobile
clients using different .ASPX files. By default, default.aspx receives requests
for
both
desktop and mobile clients. How can your application process default-mobile.
aspx
instead without changing the path in the browser’s address bar?
A. Server.Execute
B. Response.Clear
C. Server.Transfer
D. Response.Redirect
Answer:C
Q22. You are developing
multilingual blog software. Writers will create a new blog entry in
their
native language by typing it into a web form, which the application stores in a
database.
Translators will then translate the blog entry into other languages, and
editors
will
review the translation before approving it. Additionally, static text
information
(such
as the copyright details) is stored in language-specific resource files. You
must choose how to display the version of a blog entry in the reader’s
preferred language.
What
should you do? (Choose two. Each answer forms part of the complete solution.)
A. Set
Thread.CurrentThread.CurrentUICulture.
B. Set
Thread.CurrentThread.CurrentCulture.
C. Store
translated blog entries in the database, and then read the correct entry
based
on the user’s language preference.
D. Store
translated blog entries in resource files.
Answer
: A,C
Q23. You are designing an
English language website for users in several countries. The countries
each
have their own standards for displaying dates and currencies. How can you
customize
the display of information according to the standards of each user’s country?
(Choose
two. Each answer forms part of the complete solution.)
A. Set
Thread.CurrentThread.CurrentUICulture.
B. Set
Thread.CurrentThread.CurrentCulture.
C. Using
String.Format to display dates and currency.
D. Use
Object.ToString to display dates and currency.
Answer:B,C
Q24. You have created resource
files that include translations for the text properties of all
server
controls in a new web application. You need to test the website to verify that
it
displays
the French language translations correctly. Which of the following could you
do?
(Choose two. Each answer forms a complete solution.)
Objective 2.3: Plan for Globalization Chapter 2 81
A. In
Page.Load, set Thread.CurrentThread.CurrentUICulture to a new
instance of
CultureInfo
created
with the string “fr”.
B. In
Page.Load, set Thread.CurrentThread.CurrentCulture to a new
instance of
CultureInfo
created
with the string “fr”.
C. Add
uiculture=”fr” to the @ Page directive.
D. Add
culture=”fr” to the @ Page directive.
Answer:A,C
Q25. You are designing a data
access service that will allow several types of clients to access
a
back-end database server running Microsoft SQL Server Express Edition. Non-.NET
client
developers plan to access the data access service across the Internet by using
secure
open standard protocols. Developers creating .NET clients plan to access the
service
by using faster, .NET-only protocols that use TCP. Which approach should you
use?
A. Create
an ASMX page.
B. Create
a WCF web service.
C. Configure
the firewall to forward Internet traffic to the database server.
D. Generate
an ADO.NET Entity Data Model.
Answer:
B
Q26. You are designing a data
access layer for a WCF application that will connect to an
existing
database running on the local network. You want to develop the layer as
efficiently
as possible, use strongly typed data objects, and use an object-oriented
development
model. Which data access technology should you use?
A. ADO.NET
B. WCF
data services
C. ASP.NET
web services
D. WCF
Entity Framework
Answer:D
Q27. You are designing a data
access layer that will be accessed by remote clients on the
Internet.
Clients might be running JavaScript or the .NET Framework. You would like to
create
the data access layer with the least amount of development effort. Which data
access
technology should you use?
A. ADO.NET
B. WCF
data services
C. ASP.NET
web services
D. WCF
Entity Framework
Answer:B
Q28. You are designing an
ASP.NET MVC 2 web application that will provide information
about
products that your company sells to potential customers on the Internet. You
create
a custom class named Product that contains all information about each
product.
You
need to create two pages: one for administrators to use to update product
information,
and
one for end users to view the product information. You must use strong
typing
in both the action and the view while allowing MVC to automatically process
form
data. What should you do? (Choose two. Each answer forms part of the complete
solution.)
A. Access
the ViewData items.
B. Use
strongly typed view model classes.
C. Use
automatic model binding.
D. Access
the FormCollection items.
Answer:B.C
Q29. You are designing a web
application that accesses a separate WCF data service to
view
and update records in a database. You want to provide a highly responsive user
interface
that supports identity management and does not rely on the web server to
retrieve
or submit data. You need to minimize development time. Which approach
should
you use?
A. Create
a custom web form with HTML controls. Use jQuery to manipulate the
contents
of the HTML controls.
B. Create
a custom web form, with all server controls contained within an
UpdatePanel
control.
Objective 3.2: Design Data Presentation and Interaction Chapter 3 115
C. Use
the GridView and EntityDataSource server controls.
D. Use
ASP.NET AJAX and the AdoNetDataContext and DataView classes.
3. You
are creating a view for an MVC application. Answer:D
Q30.You need to create a nonstandard HTML
control that should be rendered on the server. You must minimize the amount
of
client and server resources used as well as your development time. Which
approach
should
you choose?
A. Use
the jQuery library to dynamically add the HTML control to the document
object
model.
B. Create
an HtmlHelper extension.
C. Create
a custom server control.
D. Create
a custom Web Part.
Answer:B
Q31.
You
are creating an ASP.NET page that allows users to submit URLs that will be
indexed
by your intranet’s search engine. You need to verify that each URL
submitted returns a
valid response. You need to perform both client-side and server-side
validation when
the user clicks a Button server control. What should you do?
A. Use a CustomValidator control.
B. Use a RegularExpressionValidator control.
C. Write a JavaScript function that handles the button’s onClick
event.
D. Write a JavaScript function that handles the text
box’s onChange event.
Answer:A
Q32.
You
are creating an ASP.NET page that prompts users to enter their phone number.
You need to perform both client-side and server-side validation to
verify that the user
entered a phone number and that it matches the format xxx-xxx-xxxx.
Which controls
should you use? (Choose all that apply. Each answer forms part of the
complete
solution.)
A. RegularExpressionValidator
B. RangeValidator
C. RequiredFieldValidator
D. CompareValidator
Answer : A,C
126 Chapter 3 Designing Data Strategies and Structures
Q33.
You
are designing the data model for an MVC application. The data model includes a
class that represents the user, including an optional age field. If the
user does enter her
age, you want the application to verify that it is between 0 and 150.
Which attribute
type should you use?
A. Remote
B. Range
C. Required
D. RegularExpression
Answer
: B
Q34. You are
designing an Model-View-Controller (MVC) application that accesses a database
running on a different server. Your organization’s security policy
states that all
database requests must be issued by using the end-users’ credentials;
the web server’s
process identity cannot be granted any privileges to the database. Both
the web server
and the database server participate in the same Active Directory domain.
How can you
enable database queries while minimizing security risks? (Choose all
that apply. Each
answer forms part of the complete solution.)
A. Use delegation to access the database.
B. Enable constrained delegation for the web server’s
computer account.
C. Add the Network Service account to the Domain Admins
group.
D. Change the process identity of the application to the
System account.
Answer : B
Q35.
You
are designing an ASP.NET application that calls a third-party assembly to
generate
chart images that it stores in a local folder accessible to web users.
You need to minimize
the security risks of calling the third-party component. Which approach
should
you recommend?
A. Create a local user account with minimal privileges,
and configure the account as
the third-party assembly’s process identity.
B. Create an Active Directory domain user account with
minimal privileges, and configure
the account as the third-party assembly’s process identity.
C. Create an application domain with the least privileged
trust level, and launch the
component within the application domain.
D. Configure the assembly to impersonate the end-user’s
credentials.
Answer:C
Q36. You are
designing a public ASP.NET application that allows unauthenticated users to
upload files to the Uploads folder. Systems administrators have created
a local user
account, WebAppUser, and configured the application pool to use it as
the process
identity. You need to configure NTFS file permissions to allow the
application to function
correctly while minimizing security risks. What should you do? (Choose
all that
apply. Each answer forms part of the complete solution.)
A. Grant WebAppUser Read access to all application files.
B. Grant WebAppUser Write access to all application
files.
C. Grant WebAppUser Read access to the Uploads folder.
D. Grant WebAppUser Write access to the Uploads folder.
Answer:A,D
Q37.
You
are designing an ASP.NET application. To fit into existing account management
processes, the IT department needs the ability to retrieve users’
original passwords.
What should you recommend? (Choose two. Each answer forms part of the
complete
solution.)
A. Use encrypted passwords.
B. Use hashed passwords.
C. Use the built-in SQL membership provider.
D. Create a custom membership provider.
Answer:A,D
Q38.
You
are designing an ASP.NET application. Within the /administer/ subfolder, you
plan
to add pages that perform management tasks and should be accessed only
by members
of the Administrators role. Which approach should you recommend to
protect the
folder?
A. Create a custom trust level.
B. Edit the Web.config file.
C. Apply the PrincipalPermission attribute.
D. Apply the Authorize attribute.
Answer:C
Q39.
You
are designing an MVC application. Within the Administer area, you plan to add
pages that perform management tasks and should be accessed only by
members of
the Administrators role. Which approach should you recommend to protect
the area?
A. Configure IIS to block anonymous requests to the
folder.
B. Add the PrincipalPermission attribute to each
action result.
C. Add the Authorize attribute to each action
result.
D. Edit the Web.config file.
Answer:C
Q40.
You
are creating an MVC application running on IIS 7.5 that contains a separate
area
containing management tools. Only administrators on the local network,
10.1.1.0/24,
should be allowed to access those pages. Users from other networks
should be redirected
to a support page on the same site. If the network or support page
changes in
the future, you would like systems administrators to be able to modify
the configuration
without recompiling the application. Which approach should you
recommend?
A. Use the IIS URL Rewrite module.
B. Create a custom action filter.
C. Use IIS IP address restrictions.
D. Use Windows Firewall.
Answer:A
Q41.
You
are designing an Internet e-commerce application that requires users to enter
credit card information to make a purchase. You need to ensure that the
credit card
information is encrypted when it is transmitted across the network.
Which approach
should you recommend?
A. Hash the credit card by using client-side JavaScript.
B. Encrypt the credit card by using client-side
JavaScript.
C. Use Internet Protocol Security (IPsec).
D. Require SSL for the page.
Answer:D
Q42.
You
are designing an Internet e-commerce application that requires users to enter
credit card information to make a purchase. You need to verify that the
user’s billing
address matches the billing address associated with the credit card,
which you can
retrieve by using a web service. Which approach should you recommend?
A. Handle the Submit button’s onClick event in
JavaScript.
B. Handle the Submit button’s OnClick event in
ASP.NET.
C. Install an SSL certificate on the web server, and
require HTTPS for the page.
D. Set the page’s ValidateRequest attribute to True.
Answer : B
Q43.
You
are designing the testing methodology for an MVC application. The application
performs server-side data validation in the controllers, performs
client-side data
validation in the views, implements the application logic in the domain
model, and
authorizes users in the database itself. You need to create white box
test cases that
directly verify that the application conforms to the business rules.
Which layer should
you design the test cases against?
A. Model
B. Views
C. Controllers
D. Database
Answer: A
Q44.You are
designing the testing methodology for an MVC application. The application
performs server-side data validation in the controllers, performs
client-side data validation
in the views, implements the application logic in the domain model, and
authorizes
users in the database itself. You need to create black box test cases
that verify
that the application accepts valid data and rejects invalid data. Which
layer should you
design the test cases against?
A. Client browser
B. Controllers
C. Model
D. Database
Answer:A
180 Chapter 5 Preparing for and Investigating
Application Issues
Q45.
You
are designing the testing methodology for an MVC application. The application
performs server-side data validation in the controllers, performs
client-side data
validation in the views, implements the application logic in the domain
model, and
authorizes users in the database itself. You need to create white box
test cases that
verify that the application will reject potentially malicious values
entered by users for
security purposes. Which layer should you design the test cases against?
A. Model
B. Views
C. Controllers
D. Database
Answer:C
Q46.
You
are designing an MVC application. Different developers will be writing
different
controllers, and each developer needs to be able to implement his or her
own code for
unhandled exceptions. Which approach should you recommend?
A. Create a custom Page class, implement the Page_Error
method, and derive your
pages from the custom Page class.
B. Configure a custom error page in the Web.config file.
C. Add code to the Application_Error method in the
Global.asax file.
D. Apply the HandleError attribute to each
controller, and add a view named Error.
aspx.
Answer:D
Q47.
You
are designing an ASP.NET application. You need to provide an approach for
centralized exception management. All unhandled exceptions need to be
processed
by a single method that provides logging, even if the page developer
does not follow
your page development guidelines. When unhandled exceptions occur, you
want ASP.
NET to display the default error message to the user. Which approach
should you
recommend?
A. Create a custom Page class, implement the Page_Error
method, and derive your
pages from the custom Page class.
B. Configure a custom error page in the Web.config file.
Objective 5.2: Design an Exception-Handling Strategy Chapter
5 189
C. Add code to the Application_Error method in the
Global.asax file.
D. Set the Page.ErrorPage property.
Answer:C
Q48.
You
are designing an MVC controller action. You need to redirect users to a
different
view if an unhandled exception occurs. Users need to be sent to
different pages, based
on the type of the exception. Code readability is a priority. Which
approach should you
recommend?
A. Add the HandleError attribute to the
controller.
B. Add multiple HandleError attributes to the
controller.
C. Surround the action with a single Try/Catch block.
D. Surround the action with a Try block and
multiple Catch blocks.
Answer:B
Q49.
You
helped develop an MVC e-commerce application that features expandable
JavaScript
menus. The application is hosted on a remote server running IIS 7.5.
Occasionally,
the menus fail to expand when the user clicks them, Which approach
should you
recommend to troubleshoot the problem?
A. Use the FusLogVw tool.
B. Use the AdPlus tool.
C. Attach Visual Studio to the remote IIS process.
D. Attach Visual Studio to the Internet Explorer process.
Answer:D
Q50.
You
helped develop an MVC e-commerce application that features expandable
JavaScript
menus. The application is hosted on a remote server running IIS 7.5.
Occasionally,
the application experiences unhandled .NET Framework exceptions, Which
approach should you recommend to troubleshoot the problem?
Objective 5.3: Recommend an Approach to Debugging Chapter
5 199
A. Use the FusLogVw tool.
B. Use the AdPlus tool.
C. Attach Visual Studio to the remote IIS process.
D. Attach Visual Studio to the Internet Explorer process.
Answer : C
Q51.
You
helped develop an MVC e-commerce application that features expandable
JavaScript
menus. The application is hosted on a remote server running IIS 7.5.
Occasionally,
the application hangs. Which approach should you recommend to
troubleshoot
the problem?
A. Use the FusLogVw tool.
B. Use the AdPlus tool.
C. Attach Visual Studio to the remote IIS process.
D. Attach Visual Studio to the Internet Explorer process.
Answer:B
Q52.
You
are designing an ASP.NET application. One of the pages shows company news,
which is read from a database. The news article being viewed is
identified as part of
the query string, such as http://contoso.com/news.aspx?id=8342. For a
given ID, the
page is exactly the same, regardless of which user views the page, or
when they view it.
You expect the page to be extremely busy after company announcements,
and need
to minimize the server processing time for each page load. Which
technology should
you recommend?
A. Use the Application cache.
B. Create a WCF service that caches database queries.
C. Use fragment caching.
D. Use page caching.
Answer : D
Objective 5.4: Recommend an Approach to Performance
Issues Chapter 5 205
Q53.
You
are designing an update to an MVC application. Systems administrators have
requested greater insight into the inner workings of an application to
assist them with
occasional troubleshooting. For example, they would like to know when
the application
performs normal tasks, such as connecting to a database, as well as when
errors occur,
such as when a web service fails to respond. You need to minimize the
performance
impact. Which technology should you recommend?
A. Use Trace.Write and Trace.Warn.
B. Take advantage of Event Tracing for Windows.
C. Create and update performance counters.
D. Store the data in an XML file.
Answer : B
Q54.
You
are designing an ASP.NET application. Most of the content on the site is
static;
however, you will have a section along the side of each page containing
dynamically
generated, user-specific content. You want to use page caching and
update the
dynamic content as efficiently as possible. Which technology should you
recommend?
A. Place the content in a user control.
B. Place the content in a Placeholder control.
C. Place the content in an UpdatePanel control.
D. Place the content in a Substitution control.
Answer:D
Q55.
You
are planning the deployment of a new ASP.NET web application. The application
is
going to be deployed to an untrusted web hosting provider, and you must
not deploy
source code. Also, you must prevent the application from being updated.
Which
approaches could you recommend? (Choose all that apply. Each answer
forms
a complete solution.)
A. Use the Publish Web tool.
B. Use the ASP.NET Compilation Tool.
C. Create a web deployment package.
D. Create a Web Deployment Project.
Answer:B,D
Objective 6.1: Design a Deployment Process Chapter
6 223
Q56.
You
are planning the deployment of a new ASP.NET web application. You want to
deploy the application as a single DLL. Which approach should you
recommend?
A. Use the Publish Web tool.
B. Use the ASP.NET Compilation Tool.
C. Create a web deployment package.
D. Create a Web Deployment Project.
Answer : D
Q57.
You
are planning the deployment of a new ASP.NET web application to several servers
running IIS 7.5. Because the web servers are protected by firewalls, you
need to send
the application to systems administrators for installation. You need to
deploy a Microsoft
SQL Server Express Edition database with the application. Which approach
should
you recommend?
A. Use the Publish Web tool.
B. Use the ASP.NET Compilation Tool.
C. Create a web deployment package.
D. Create a Web Deployment Project.
Answer:D
Q58.
You
are planning to deploy a new .NET 4.0 web application to a web server running
IIS 7.5. Currently, the web server has several .NET 2.0 applications
running on it, and
those applications have not been tested with the .NET Framework. How can
you
deploy the new application to minimize the risk of affecting the
existing applications?
A. Add the new application to the existing application
pool, but update the application
pool to .NET 4.0.
B. Add the new application to a new application pool.
C. Configure the application pool to use classic pipeline
mode.
D. Configure the new application with a separate
web.config file.
Answer:B
Q59.
You
are planning to deploy a new .NET 4.0 web application developed on your local
computer to a staging environment for testing. After the quality
assurance team
approves the application in the staging environment, you need to deploy
it to the
production environment. The staging and production environments should
not display
detailed error messages or allow tracing. Additionally, they each
require different
connection strings than you use on your local computer. You will need to
deploy the
application multiple times to each environment, and you want to minimize
the effort
required with each deployment. Which solution do you recommend? (Choose
all that
apply. Each answer forms part of the complete solution.)
A. Set the <customError> mode to RemoteOnly.
B. Use the ConfigSource attribute to store the
connection strings in a separate file.
C. Edit the Web.Release.config file.
D. Create a Web.Staging.config transform file.
Answer : C,D
Q60.
You
are planning to deploy a new .NET 4.0 web application. The systems
administration
management has described that they have a separate group who administers
databases and database-related settings, and that this group should be
able to change
the connection strings for the application but not modify other
settings. The new
application stores the connection strings in the web.config file. Which
solution do you
recommend? (Choose all that apply. Each answer forms part of the
complete solution.)
A. Move the setting to a separate .config file.
B. Create a new transform file for the production environment.
C. Grant the database administrator read-only privileges
to the web.config file and
write privileges to the new file.
D. In the web.config file, specify the new file using the
ConfigSource attribute.
Answer : A,C,D
Q61.
You
are planning to scale out a web application to provide increased capacity.
Currently,
the web application runs on a single web server with a separate database
server.
The application uses session state to track users throughout their
session. How can you
add web servers while ensuring session state continues to work as
expected? (Choose
two. Each answer forms a complete solution.)
A. Use the InProc session state.
B. Use a separate session state server.
C. Configure the load-balancing mechanism for server
affinity.
D. Configure the load-balancing mechanism to distribute
requests evenly between
the servers.
Answer : C,D
Q62.
Recently,
a web application failed because it received too many requests in a short
amount of time. Currently, the web application runs on two servers: a
single web server
and a single database server. Performance analysis revealed that the web
server was
at 100 percent processor utilization at the time of the failure. You
would like to allow
the web application to handle more requests without increasing your
management or
software licensing costs. Which approaches would you recommend? (Choose
all that
apply. Each answer forms part of the complete solution.)
A. Add processors to the web server.
B. Add an additional web server, and then configure
round-robin DNS.
C. Use performance-tuning techniques to improve the
efficiency of the ASP.NET code.
D. Use the SQL Server Profiler to improve the efficiency
of the database indexes.
Answer : A,C
Q63.
You
are responsible for a web application that runs on a single server. You host
the
server at your local data center, which has a single Internet
connection. After a recent
application outage, management has decided to eliminate all single
points of failure in
the application architecture. Which approach should you recommend?
(Choose all that
apply. Each answer forms part of the complete solution.)
A. Add multiple network adapters to the web server, and
then connect them to separate
network switches.
B. Deploy the application to a cloud-hosting provider.
C. Deploy a second web server to the same data center,
and then use a hardware
load balancer.
D. Deploy a second web server to a different data center,
and then configure roundrobin
DNS.
Answer:C,D
Q64.
You
are designing an ASP.NET application. The systems administration team has
requested that their monitoring system be notified each time the
application starts.
Their monitoring system can read events from the event log. You would
like to
minimize the amount of code you need to write. Which approach should you
recommend?
A. In Application_Start, add an event to the event
log.
B. Create a custom health-monitoring event class, and
configure a standard provider.
C. Use a standard health-monitoring event class, and
configure a custom provider.
D. Use a standard health-monitoring event class and
provider.
Answer:D
Objective 6.4: Design a Health-Monitoring Strategy Chapter
6 249
Q65.
You
are designing an ASP.NET application. The systems administration team has a
mobile phone that one member of the staff uses to be notified of
outages. In the
event your application receives more than 100 failed logon attempts in
one minute,
they would like the application to send a message directly to the
on-call mobile phone
using a web service on the local network. You would like to minimize the
amount of
code you need to write. Which approach should you recommend?
A. Use a standard health-monitoring event class and
provider.
B. Create a custom health-monitoring event class, and
configure a standard provider.
C. Use a standard health-monitoring event class, and
configure a custom provider.
D. Use a custom health-monitoring event class, and
configure a custom provider.
Answer:C
Q66.
You
are designing an ASP.NET application. The systems administration team has given
you a list of events they would like to be able to monitor using ASP.NET
health monitoring.
Which of the following events will require developing a custom class?
A. Receiving more than 500 requests in one minute.
B. An authenticated user attempts to access a restricted
portion of the application
more than five times in one minute.
C. A web service takes more than ten seconds to respond
more than five times in two
minutes.
D. The application starts more than ten times in one
minute.
Answer:C