How should you complete the relevant code?
###BeginCaseStudy###
Case Study: 4
File Tax-Related Document
Background
You are developing an Azure solution that individuals and small businesses will use to
prepare and file tax-related documents.
Business Requirements
General
The solution must provide a way for customers to enter personal and demographic
information. Customers must be able to upload income documents and related documents to
the solution. The solution must provide reports and summary documents for customers in
PDF format.
Scope and Device Accessibility
The solution must support two operational modes: On-Peak and Off-Peak. On-Peak is
defined as the first quarter of a year. Off-Peak is defined as the other three quarters of a year.
Customers must be able to access the solution by using desktop computers, laptop computers,
mobile devices, and tablets.
High Availability and Business Continuity
The solution must be available at all times. When the solution transitions between Off-Peak
mode and On-Peak mode, solution availability must not be affected. Disaster recovery must
be established for the customers’ stored data.
Diagnostics
The solution must log relevant diagnostic data that can be used to troubleshoot the cloud
service.
Scalability
The solution must scale out while transitioning from Off-Peak mode to On-Peak mode.
Cost
The solution must use cloud resources optimally to minimize operating costs.
Storage and Security
The solution must be secure to prevent any anonymous access (including read access) to the
customers’ tax documents.
Cross-Premises Networking
The solution must extend the developers’ on-premises network into Azure.
Technical Requirements
The logical design for the solution is shown in the following exhibit.
Platform-as-a-Service (PaaS)
The solution must have two roles: a web role and worker role. The web interface of the
solution uses a web role to accept and send user input and any related documents. The worker
role must access the stored data and prepare the tax documents in the background.
Compute
The solution must support a minimum of 10 role instances. When the solution is in On-Peak
mode, each role instance must be allocated at least 6 GB of memory. The memory can be
scaled down to 3 GB when the solution is in Off-Peak mode.
The solution must cache documents locally. The cache does not need to be refreshed during
the lifecycle of the worker role.
Role instances that are running should not be affected by topology changes such as an
increase in instance count.
Storage
The web role must store documents in blob storage. A SQL database is used to store
customer information. The worker role must use queues to process the final tax documents.
Performance and Scalability
When the solution is in Off-Peak mode, it must support at least 150 concurrent database
sessions, and the maximum size of the database is 50 GB. When the solution is in On-Peak
mode, it must support 750 concurrent database sessions, and the maximum size of the
database is 300 GB. Geo-replication must be enabled and must be configurable by using the
Azure management portal.
Software Prerequisites
The solution must install the software that is necessary to generate PDF documents on the
server. The software will be provided as a Windows Installer package.
Debugging
Solution errors and warnings that occur in a web role must be logged. The worker role must
log any crash dump files. Detailed information about errors and their context must be
collected so that the environment in which errors occurred can be simulated locally.
Security
At the time that a customer’s tax information and documents are accepted, the solution must
send an email to the customer. The email contains a secure hyperlink that the customer can
use to upload any additional necessary documents. The customer is asked to upload these
documents within 48 hours. If the customer does not upload the documents within 48 hours,
the solution should not issue a new hyperlink. The solution must send an email to the
customer to remind the customer to use the original hyperlink to upload any additional
necessary documents.
Network Services
The solution must use a cross-premises secure network. The network must be configurable by
using the Azuremanagement portal.
Social Structure
Relevant portions of the solution files are shown in the following code segments. Line
numbers in the code segments are included for reference only and include a two-character
prefix that denotes the specific file to which they belong.
###EndCaseStudy###
DRAG DROP
You need to develop the web role.
How should you complete the relevant code? To answer, drag the appropriate code segments to the correct
locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split
bar between panes or scroll to view content.
Which approach should you recommend?
You are designing an ASP.NET MVC 2 Web application. You have the following
requirements: Type safety must be validated at compile time. Code must not require explicit
run-time type casting. You need to pass data between the controllers and the views within
the Web application. Which approach should you recommend?
You need to ensure that the function verifies that customers have no outstanding orders before they are marked
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server 2008 database. The application uses DataContexts to
query the database. You create a function that meets the following requirements:
• Updates the Customer table on the database when a customer is marked as deleted. • Updates the
related entries in other tables (CustomerAddress, CustomerContacts) by marking them as deleted.
• Prevents consumer code from setting the Deleted columns value directly.
You need to ensure that the function verifies that customers have no outstanding orders before they
are marked as deleted. You also need to ensure that existing applications can use the updated
function without requiring changes in the code. What should you do?
You need to modify the application to prevent the site from loading slowly
You create a console application to manage Personal Sites. The application contains the following
code segment. (Line numbers are included for reference only.) 01 SPSite siceCollection = new
SPSite (“http://rcoss”); 02 UserProfileManager profileManager = new UserProfileManager (
Server-Context.GetContext (siteCollection)) ; 03 UserProf ile profile = prof ileManager. GetUser
Prof ile (“domainWusername”) ; 04 SPSite personalSite = profile.PersonalSite ; 05 06
siteCollection.Dispose (); You deploy the application to a SharePoint site. After deploying the
application, users report that the site loads slowly. You need to modify the application to prevent
the site from loading slowly. What should you do?
Which code segment should you insert at line 21?
You develop a service that runs on a worker role in Azure. The service caches a large amount of data from a
database at startup. The service has a configuration file that includes two settings named ConnectionString
and SleepInterval.
The service must restart when the value of the ConnectionString setting changes. The service must NOT restart
when the value of the SleepInterval setting changes.
You have the following code. Line numbers are for reference only.
You need to configure the service.
Which code segment should you insert at line 21?
Which network mask should you use?
Your company is designing its network. The network will use an IPv6 prefix of
2001:DB8:BBCC:0000::/53. You need to identify an IPv6 addressing scheme that will support 2000
subnets. Which network mask should you use?
You need to ensure that the application can add new Customer entities
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application uses the ADO.NET Entity Framework to model entities. The application includes a
Customer entity along with a CustomerKey property of the Guid type as shown in the following
exhibit.
You discover that when the application adds a new instance of a Customer, calling the SaveChanges
method results in the following error message:
“Server generated keys are only supported for identity columns.”
You need to ensure that the application can add new Customer entities.
What should you do?
Which two approaches will achieve the goal?
You have an ASP.NET application that runs in a cloud service. A new version of the application is ready for
release. The new version contains code changes and new SSL certificates. The application consists of six
instances of a web role and four instances of a worker role.
The application performs at or near full capacity. The cloud service uses the default number of fault domains
and upgrade domains.
You plan to deploy the new version of the application. The performance and capacity of the web roles must
not degrade during the deployment. Temporary degradation of the worker roles is acceptable. The
deployment must take a maximum of six hours.
You need to deploy the new version of the ASP.NET application to the cloud service.
Which two approaches will achieve the goal? Each correct answer presents a complete solution.
You need to record all unexpected errors that occur in the application
You are designing a complex and critical Windows desktop application by using Microsoft
.NET Framework 4 and Microsoft Visual Studio 2010. You plan to implement a logging
strategy for the application. You need to record all unexpected errors that occur in the
application. What should you do?
Which approach should you recommend?
You are using Business Connectivity Services to design a SharePoint 2010 application that
connects to an external database. The database users have accounts for authentication that
are different from their Active Directory accounts. You have a requirement to allow users to
connect to the external database without prompting the user for credentials. You need to
store user credentials and use these credentials when connecting to the external database.
Which approach should you recommend?