ASP.NET MVC Marathon App Development
ASP.NET MVC Marathon App Development
137q
Number: 70-486
Passing Score: 800
Time Limit: 120 min
70-486
Website: https://vceplus.com
VCE to PDF Converter: https://vceplus.com/vce-to-pdf/
Facebook: https://www.facebook.com/VCE.For.All.VN/
Twitter : https://twitter.com/VCE_Plus
https://vceplus.com/
Background
You are developing an ASP.NET MVC application in Visual Studio that will be used by Olympic marathon runners to log data about training runs.
Business Requirements
The application stores date, distance, and duration information about a user's training runs. The user can view, insert, edit, and delete records.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application must be optimized for accessibility.
Technical
Requirements
Data Access:
Database access is handled by a public class named RunnerLog.DataAccess.RunnerLogDb.
All data retrieval must be done by HTTP GETand all data updates must be done by HTTP POST.
Layout:
All pages in the application use a master layout file named \Views\Shared\_Layout.cshtml.
Models:
The application uses the \Models\LogModel.cs model.
Views:
All views in the application use the Razor view engine.
Controllers:
The application contains a \Controllers\RunLogController.cs controller.
Images:
A stopwatch.png image is located in the \Images folder.
Videos:
A map of a runner's path is available when a user views a run log. The map is implemented as an Adobe Flash application and video. The browser should
display the video natively if possible, using H264, Ogg, or WebM formats, in that order. If the video cannot be displayed, then the Flash application should be
used.
Security:
You have the following security requirements:
The application is configured to use forms authentication.
Users must be logged on to insert runner data.
Users must be members of the Admin role to edit or delete runner data.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
There are no security requirements for viewing runner data.
You need to protect the application against cross-site request forgery.
Passwords are hashed by using the SHA1 algorithm.
Relevant portions of the application files follow. (Line numbers are included for reference only.)
Application Structure
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://www.gratisexam.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://www.gratisexam.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://www.gratisexam.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 1
If the canvas element is supported by the client browser, the application must display "London 2012" in the footer as text formatted by JavaScript at the end of the
_Layout.cshtml file.
You need to modify the layout to ensure that "London 2012" is displayed as either formatted text or as plain text, depending on what the client browser supports.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 2
You need to add an action to RunLogController to validate the users' passwords.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 3
You need to make all of the rows in the table bold in the Views/RunLog/GetLog.cshtml view.
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 4
You need to display the "miles" unit description after the distance in the GetLog view.
Which line of code should you use to replace line GL21? (Each correct answer presents a complete solution. Choose all that apply.)
A. @log.Distance miles
B. @Htrml.DisplayFor(model =>log.Distance) miles
C. @log.Distance.ToString() @Html.TextArea("miles")
D. @Html.DisplayFor(model => log.Distance.ToString() + " miles")
Correct Answer: AB
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 5
The RunLog/Views/InsertLog.cshtml view must display the /Images/stopwatch.png image and the “Insert Run Data” header text below the image. The view should
resemble the exhibit. (Click the Exhibit button.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application must display the image above the field set.
You need to add the HTML code to /Runlog/Views/InsertLog.cshtml to display the image and header text.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Example:
<div style="background-image: url(../images/test-background.gif); height: 200px; width:400px; border: 1px solid black;">Example of a DIV element with a
background image:</div>
<div style="background-image: url(../images/test-background.gif); height: 200px; width: 400px; border: 1px solid black;"> </div>
Background
You are developing an online shopping web application.
Business Requirements
A user is not required to provide an email address. If a user enters an email address, it must be verified to be a valid email address.
Information about the first product on the product page must fade out over time to encourage the user to continue browsing the catalog.
Administrators must be able to edit information about existing customers.
Administrators also must be able to specify a default product on the product page. Technical
Requirements
General:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The web store application is in a load-balanced web farm. The load balancer is not configured to use server affinity.
The web store application isan ASP.NET MVC application written in Visual Studio.
Products:
The value of the product ID property must always be greater than 0.
The Products page for mobile devices must display to mobile users. The Products page for desktop devices must display to desktop users.
Storage:
The data must be stored in a serialized XML data format.
Serialized objects must be schema-independent.
Exception handling:
Exceptions originating from IIS must display a page with support contact information.
Some page links expire, and users who access these links encounter 404 errors.
Exceptions must be logged by using the WriteLog method of the Utility class.
Application Structure
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 1
An advertising campaign was recently launched. Some of the ads contain a link to products that no longer exist or have IDs that have changed.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Explanation:
QUESTION 2
You need to modify the application to meet the product Id requirement.
What should you do?
https://vceplus.com/
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Scenario: The value of the product Id property must always be greater than 0.
The GetDealPrice method, in the ProductController, has ProductID as input parameter.
Note: The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method or property, and throws an exception if the
condition for the contract fails.
Syntax:
'Declaration
Public Shared Sub Requires(Of TException As Exception) ( _ condition As Boolean _)
Type Parameters
TException
The exception to throw if the condition is false.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Parameters
condition
Type: System.Boolean
The conditional expression to test.
Incorrect:
Not D: The Contract.Assume method instructs code analysis tools to assume that a condition is true, even if it cannot be statically proven to always be true.
QUESTION 3
You need to implement the business requirements for managing customer data.
What should you do? Each correct answer presents part of the solution. Choose all that apply.
A. Add a folder named Customer to the Views folder. Then create a view inside this folder named Edit.aspx.
B. Add a folder named EditCustomer to the Views folder. Then create a view inside this folder named Catalog.aspx.
C. Add a class named CustomerController to the Controllers folder. Then add a method named Edit to the class.
D. Add a class named Catalog to the Controllers folder. Then add a method named EditCustomer to the class.
Correct Answer: AC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
From scenario: One of the business requirements, is that administrators must be able to edit information about existing customers.
QUESTION 4
When users attempt to retrieve a product from the product page, a run-time exception occurs if the product does not exist.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
C. Option C
D. Option D
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 5
You updated the web.config file with the HTTP run-time value required to display an alternative version of the site.
You need to ensure that the correct page displays to the users.
A. If (Request.IsTabletDevice)
B. If (Request.Browser.IsBrowser("Mobile"))
C. If (Request.UserAgent["Tablet"])
D. If (Request.Browser.IsMobileDevice)
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 6
You need to implement client-side animations according to the business requirements.
Which line of code should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. $("body h1:nth-child(1)").fadeIn(1000);
B. $("body h1:nth-child(1)").fadeOut(1000);
C. $("body h1:nth-child(1)").animate({ opacity: 0 });
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: BC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
From scenario: Information about the first product on the product page must fade out over time to encourage the user to continue browsing the catalog.
QUESTION 7
You need to implement client-side animations according to the business requirements.
Which line of code should you use? (Each correct answer presents a complete solution. Choose all that apply.)
Correct Answer: AD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
From scenario: Information about the first product on the product page must fade out over time to encourage the user to continue browsing the catalog.
QUESTION 8
You need to configure session storage in the web.config file to meet the technical requirements for scalability.
Which SessionState mode should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. StateServer
B. InProc
C. AutoDetect
D. SqlServer
Correct Answer: AD
Section: [none]
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Explanation:
ASP.NET session state supports several different storage options for session data. Each option is identified by a value in the SessionStateMode enumeration. The
following list describes the available session state modes:
StateServer mode, which stores session state in a separate process called the ASP.NET state service. This ensures that session state is preserved if the Web
application is restarted and also makes session state available to multiple Web servers in a Web farm.
SQLServer mode stores session state in a SQL Server database. This ensures that session state is preserved if the Web application is restarted and also makes
session state available to multiple Web servers in a Web farm.
InProc mode, which stores session state in memory on the Web server. This is the default.
Custom mode, which enables you to specify a custom storage provider.
Off mode, which disables session state.
References: https://msdn.microsoft.com/en-us/library/ms178586.aspx
QUESTION 9
You need to update the routes to ensure that a product is always displayed on the product page.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
C. Option C
D. Option D
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 10
The GetDealPrice method must be called by using Ajax.
You need to get the price of a product by using the GetDealPrice method of the ProductController.
Which code segment should you use? (Each correct answer presents a complete solution. Choose all that apply.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: CD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Testlet 1
Background
You are developing a video transcoding service. This service is used by customers to upload video files, convert video to other formats, and view the converted
files. This service is used by customers all over the world.
Business Requirements
The user-facing portion of the application is an ASP.NET MVC application. It provides an interface for administrators to upload video and schedule transcoding. It
also enables administrators and users to download the transcoded videos.
When videos are uploaded, they are populated with metadata used to identify the video. The video metadata is gathered by only one system when the video
upload is complete.
If the logged-on user is an administrator, then the header will contain links to administrative functions. This information is read from a cookie that is set on the
server. The administrative links must not be present if an error condition is present.
Technical Requirements
User Experience:
The front-end web application enables a user to view a list of videos.
The main view of the application is the web page that displays the list of videos.
HTML elements other than the list of videos are changed with every request requiring the page to reload.
Compatibility:
Some customers use browsers that do not support the HTTP DELETE verb.
These browsers send a POST request with an HTTP header of X-Delete when the intended action is to delete.
Transcoding:
The video transcoding occurs on a set of Windows Azure worker roles.
The transcoding is performed by a third-party command line tool named transcode.exe. When the tool is installed, an Environment variable named transcode
contains the path to the utility.
A variable named license contains the license key. The license for the transcoding utility requires that it be unregistered when it is not in use.
The transcoding utility requires a significant amount of resources. A maximum of 10 instances of the utility can be running at any one time. If an instance of the
role cannot process an additional video, it must not prevent any other roles from processing that video.
The utility logs errors to a Logs directory under the utilities path.
A local Azure directory resource named perf is used to capture performance data.
Development:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Developers must use Microsoft Remote Desktop Protocol (RDP) to view errors generated by the transcode.exe utility.
An x509 certificate has been created and distributed to the developers for this purpose.
Developers must be able to use only RDP and not any other administrative functions.
Application Structure
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 1
You are creating a new authentication system that uses an HTTP header value.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
What should you do? (Each correct answer presents a complete solution. Choose all that apply.)
A. Create a class derived from ActionResult and check for a valid HTTP header value in the ExecuteResult method. Change all actions to return this new class.
B. Create an HttpHandler to check fora valid HTTP header value in the ProcessRequest method.
C. Create an HttpModule and check for a valid HTTP header value in the AuthenticateRequest event.
D. Create a class derived from AuthorizeAttribute and check for a valid HTTP header value in the AuthorizeCore method. Change usages of the existing
AuthorizeAttribute to use the new class.
Correct Answer: CD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 2
You need to maximize performance of video delivery.
Which code segment should you use as the body of the GetVideoStream function in the Video-Controller class?
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 3
The transcode.exe utility activates its license online when it is installed.
You need to ensure that the registration of the transcode utility is handled as specified in its license.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B C. Option C
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 4
You need to ensure that all the MVC controllers are secure.
Which code segment should you use as the body for the CreateController method in AdminVerifierFactory.cs?
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The MemberInfo.CustomAttributes property gets a collection that contains this member's custom attributes.
The Any() statement will either return null or a collection of matched custom attributes. If itmatches one or more, the controller is secure, otherwise an exception is
thrown.
From scenario: The application contains a header that is visible on every page.
If the logged-on user is an administrator, then the header will contain links to administrative functions. This information is read from a cookie that is set on the
server. The administrative links must not be present if an error condition is present.
Incorrect:
Not B: controller.GetType().Attributes will not return custom attributes.
References: https://msdn.microsoft.com/en-us/library/system.reflection.memberinfo.customattributes(v=vs.110).aspx
QUESTION 5
You need to ensure that developers can connect to a Windows Azure role by using RDP.
A. Export a certificate without a private key. Upload the .cer file to the Management Certificates section on the Azure Management Portal.
B. Export a certificate with a private key. Upload the .pfxfile to the Management Certificates section on the Azure Management Portal.
C. Export a certificate without a private key. Upload the .cer file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure
Management Portal.
D. Export a certificate with a private key. Upload the .pfx file to the Certificates section under the TranscodeWorkerRole hosted service on the Azure Management
Portal.
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
In case you don’t want to use the RDP certificate created by WindowsAzure Tools and want to use a custom certificate instead, the following steps will guide you.
These steps can also be used in case package is not being published from Visual Studio rather it is being built locally, saved in either Local Machine's Drive or
Windows Azure Blob Storage and subsequently published from there.
Here are the steps which are required to get pass the publishing error which you might be running into. You would need to upload the Certificate with Private Key
to the portal (when VisualStudio is used this is done in the background).
Detailed steps.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
In Visual Studio, go to the solution which is being developed.
Right click the Web Project -> Configure Remote Desktop -> click on View to see Certificate details (Since I don’t have a custom certificate I will use one create
by Windows Azure Tools itself)
Go to Details tab on Certificate -> Click Copy to file. -> Next -> Select ‘Yes, export the private key’ -> Next -> Continue with default setting and create a password
when asked (please refer below screenshots)
These steps will generate a .PFX file for this certificate. Now we need to upload this certificate to the portal (for the respective cloud service)
Go to the Azure Management Portal -> Go to the Cloud Service in question ->Certificates Tab -> Upload the newly created certificate (.PFX file)
Note:
The certificates that you need for a remote desktop connection are different from the certificates that you use for other Azure operations. The remote access
certificate must have a private key.
Reference: How to use Custom Certificate for RDP to Windows Azure Roles
http://blogs.msdn.com/b/cie/archive/2014/02/22/how-to-use-custom-certificate-for-rdp-to-windows-azure-roles.aspx
Question Set 1
QUESTION 1
You are testing an ASP.NET application.
The test plan requires that tests run against the application's business layer.
You need to use the test project template that meets this requirement.
Correct Answer: C
Section: [none]
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Explanation:
QUESTION 2
You are authoring unit tests.
The unit tests must test code that consumes sealed classes.
You need to create, maintain, and inject dependencies in the unit tests.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Shim types are one of two technologies that the Microsoft Fakes Framework uses to let you easily isolate components under test from the environment.
Shims divert calls to specific methods to code that you write as part of your test. Many methods return different results dependent on external conditions, but
a shim is under the control of your test and can return consistent results at every call. This makes your tests much easier to write. References:
http://msdn.microsoft.com/en-us/library/hh549176.aspx
QUESTION 3
You are developing an ASP.NET MVC web application that includes the following method.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Which unit test should you use?
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Incorrect:
Not D: All unit tests require the [TestMethod] attribute.
References:
http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.areequal(v=vs.110).aspx
QUESTION 4
You are developing an ASP.NET MVC application by using Visual Studio.
You need to examine the state of the application when exceptions are thrown.
A. From the Debug menu in Visual Studio, select Exceptions. Enable the Thrown check box for Common Language
Runtime Exceptions.
B. From the Debug menu in Visual Studio, select Exceptions. Disable the User-unhandled check box for Common
Language Runtime Exceptions.
C. Add the following code to the web.config file of the application. <customErrors mode="On" >
<error statusCode="500" redirect="CustomErrors.html" />
</customErrors>
D. Add the following code to the web.config file of the application. <customErrors mode="On" >
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
<error statusCode="404" redirect="CustomErrors.html" />
</customErrors>
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
When you first open this window you will see that there is a tree grid with one column and checkboxes.
Break when Thrown. This includes a default list of exceptions known by the debugger, grouped by category.
Note: The possible exceptions that could break from this list is determined by the runtime you are debugging. For example, if you are using managed-only
debugging then the debugger will never break for C++, Win32 Exceptions, etc. even if they are configured to break when thrown.
Checkboxes. If you check the box for a category, then the debugger will break for all First Chance Exceptions while debugging. If you don’t want to enable all
First Chance Exceptions, you can find the specific exception types that you wish to configure by using the search box.
QUESTION 5
You are developing an ASP.NET MVC news aggregation application that will be deployed to servers on multiple networks.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application must be compatible with multiple browsers. A user can search the website for news articles. You must track the page number that the user is
viewing in search results.
You need to program the location for storing state information about the user's search.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 6
You are developing an ASP.NET MVC application that displays stock market information.
The stock market information updates frequently and must be displayed in real-time.
You need to eliminate unnecessary header data, minimize latency, and transmit data over a full-duplex connection.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 7
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You are designing a distributed application that runs on the Microsoft Azure platform.
The application must store a small amount of information that is shared cross all users and does not change frequently.
Which server-side state management option should you use? (Each correct answer presents a complete solution. Choose all that apply.)
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
SQL Database provides a relational database management system for Windows Azure and is based on SQL Server technology. With a SQL Database instance,
you can easily provision and deploy relational database solutions to the cloud, and take advantage of a distributed data center that provides enterprise-class
availability, scalability, and security with the benefits of built-in data protection and self-healing.
Incorrect:
Not A: Application State does not exist in Azure.
Not C: Profile properties stores personal, not global, information.
Not D: Session state is not global. Session states handles user information such as cookies, hidden fields, and query strings are some client-side options to
tracking user state
QUESTION 8
You are developing an ASP.NET MVC web application for viewing a list of contacts. The application is designed for devices that support changes in orientation,
such as tablets and smartphones. The application displays a grid of contact tiles in portrait mode.
When the orientation changes to landscape, each tile in the grid expands to include each contact's details. The HTML that creates the tiled interface resembles the
following markup.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The CSS used to style the tiles in landscape mode is as follows.
If this CSS is omitted, the existing CSS displays the tiles in portrait mode.
You need to update the landscape-mode CSS to apply only to screens with a width greater than or equal to 500 pixels.
Correct Answer: B
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference: Explanation:
http://www.javascriptkit.com/dhtmltutors/cssmediaqueries.shtm
l
QUESTION 9
You are developing an ASP.NET MVC application.
A. Basic
B. WindowsC. Forms
D. Kerberos
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
References: http://msdn.microsoft.com/en-us/library/aa292114(v=vs.71).aspx
QUESTION 10
You are developing an ASP.NET MVC application.
The application must allow users to enter JavaScript in a feedback text box only.
A. Apply and set the CausesClientSideValidation attribute on the text box to FALSE.
B. Apply and set the ValidateInput attribute on the text box to FALSE.
C. Use the HttpRequest.Unvalidated property to read the unvalidated form value.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. Use the HttpRequest.Form property to read the unvalidated form value.
E. Apply and set the CausesValidation attribute on the controller action to FALSE.
F. Apply and set the ValidateInput attribute on the controller action to FALSE.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
The HttpRequest.Unvalidated property gets the HTTP request values without triggering request validation.
Request validation checks for HTML markup and script that might indicate a potential cross-site scripting attack. By default, all values are checked using request
validation and if any values contain markup or script, ASP.NET throws an HttpRequestValidationException exception. Use this method if you anticipate that the
request will contain markup (for example, you are allowing users to post content that contains markup) and you want to get the raw value of a request.
References:
https://msdn.microsoft.com/en-us/library/system.web.httprequest.unvalidated.aspx https://docs.microsoft.com/en-
us/aspnet/whitepapers/request-validation
QUESTION 11
You are developing an ASP.NET MVC application that will be deployed on a web farm.
Passwords must be stored in the web.config file and must not be readable or in a format that is easily decodable
You need to encrypt the passwords that are stored in the web.config file.
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Aspnet_regiis.exe
B. Ngen.exe
C. Aspnet_merge.exe
D. EdmGen.exe
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
References: http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx
QUESTION 12
You are designing a distributed application.
The application must store a small amount of insecure global information that does not change frequently.
Which server-side state management option should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. Application state
B. Session state
C. Database support
D. Profile properties
Correct Answer: AC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than
storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and all
sessions. Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another. The topics in this
section provide information on how application state works and how to use it.
SQL Database provides a relational database management system for Windows Azure and is based on SQL Server technology. With a SQL Database instance,
you can easily provision and deploy relational database solutions to the cloud, and take advantage of a distributed data center that provides enterprise-class
availability, scalability, and security with the benefits of built-in data protection and self-healing.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
References: https://msdn.microsoft.com/en-us/library/azure/bf9xhdz4(v=vs.85).aspx
QUESTION 13
You are developing an ASP.NET MVC application. The application is deployed in a web farm and is accessed by many users.
The application must handle web server failures gracefully. The servers in the farm must share the short-term state information.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
ASP.NET session state service provides a somewhat slower service than the in-process variant as we need to make calls to a remote server. All session data is
stored in memory so shutting down the state machine will wipe out all session data as well.
References: https://dotnetcodr.com/2013/07/01/web-farms-in-net-and-iis-part-5-session-state-management/
QUESTION 14
You are developing an ASP.NET MVC application that will be deployed to servers on multiple networks.
The application must be compatible with multiple browsers. You must track the page number that the user is viewing in search results.
A. Session
B. QueryString
C. Application
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. TempData
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 15
You are designing an HTML5 website.
You need to design the interface such that the content is viewable in all types of browsers, including screen readers.
What should you do? (Each correct answer presents a complete solution. Choose all that apply.)
Correct Answer: DE
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 16
You are developing an ASP.NET MVC application in Visual Studio. The application supports multiple cultures.
The application contains a controller with the action defined in the following code segment. (Line numbers are included for reference only.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to set ViewBag.LocalizedCurrency to the localized currency contained in the resource files.
Which code segment should you add to the action at line 03?
A. ViewBag.LocaIizedCurrency = Resources.ProductDictionary.Currency;
B. ViewBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject("ProductDictionary", "Currency", new System.Globalization.CultureInfo(en"));
C. ViewBag.LocalizedCurrency = HttpContext.GetLocalResourceObject("ProductDictionary","Currency");
D. ViewBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject("ProductDictionary", "Currency");
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Only the Resources class is used.
QUESTION 17
You are developing an ASP.NET MVC application that will be deployed on a web farm.
Passwords must be stored in the web.config file and must not be readable or in a format that is easily decodable.
You need to encrypt the passwords that are stored in the web.config file.
A. Aspnet_regiis.exe
B. Aspnet_regbrowsers.exe
C. Aspnet_setreg.exe
D. Aspnet_compiler.exe
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
References: http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx
QUESTION 18
You are developing an ASP.NET MVC web application that includes the following method.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 19
You are developing an ASP.NET MVC application by using Visual Studio.
You need to examine the state of the application when exceptions are thrown.
A. From the Debug menu in Visual Studio, select Exceptions. Enable the Thrown check box for Common Language Runtime Exceptions.
B. From the DEBUG menu in Visual Studio, select Attach to Process. Select the IIS process.
C. From the Debug menu in Visual Studio, select Exceptions. Disable the User-unhandled check box for Common Language Runtime Exceptions.
D. From the TOOLS menu in Visual Studio, click Customize. Click the Command tab and select Debug.
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
When you first open this window you will see that there is a tree grid with one column and checkboxes.
Break when Thrown. This includes a default list of exceptions known by the debugger, grouped by category.
Note: The possible exceptions that could break from this list is determined by the runtime you are debugging. For example, if you are using managed-only
debugging then the debugger will never break for C++, Win32 Exceptions, etc. even if they are configured to break when thrown.
Checkboxes. If you check the box for a category, then the debugger will break for all First Chance Exceptions while debugging. If you don’t want to enable all
First Chance Exceptions, you can find the specific exception types that you wish to configure by using the search box.
QUESTION 20
You are developing an ASP.NET MVC web application for viewing a photo album. The application is designed for devices that support changes in orientation, such
as tablets and smartphones. The application displays a grid of photos in portrait mode.
When the orientation changes to landscape, each tile in the grid expands to include a description. The HTML that creates the gallery interface resembles the
following markup.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
If this CSS is omitted, the existing CSS displays the tiles in landscape mode.
You need to update the portrait mode CSS to apply only to screens with a width less than 500 pixels.
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
References: http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
QUESTION 21
You are designing a distributed banking application that handles multiple customers. A user may log on to the site to perform activities such as checking balances,
performing transactions, and other activities that must be done securely.
The application must store secure information that is specific to an individual user. The data must be automatically and securely purged when the user logs off.
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless
protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that
were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a
way to persist variable values for the duration of that session.
References: https://msdn.microsoft.com/en-us/library/ms178581.aspx
QUESTION 22
You are developing an application that supports multiple cultures.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Gacutil.exe
B. Al.exe
C. Ildasm.exe
D. Ilasm.exe
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Use the Assembly Linker (Al.exe) to compile .resources files into satellite assemblies. Al.exe creates an assembly from the .resources files that you specify. By
definition, satellite assemblies can only contain resources. They cannot contain any executable code.
The following Al.exe command creates a satellite assembly for the application MyApp from the file strings.de.resources.
References: https://technet.microsoft.com/en-us/library/21a15yht(v=vs.85)
QUESTION 23
You are preparing for the deployment of an ASP.NET MVC application. You need to generate a deployment manifest.
A. Mage.exe
B. Ngen.exe
C. ALexe
D. Resgen.exe
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
The Manifest Generation and Editing Tool (Mage.exe) is a command-line tool that supports the creation and editing of application and deployment manifests.
Incorrect:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Not B: The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images
Not C: Al.exe generates a file with an assembly manifest, not an deployment manifest, from one or more files that are either resource files or Microsoft intermediate
language (MSIL) files.
Not D: Resgen.exe, the Resource File Generator, converts text (.txt or .restext) files and XML-based resource format (.resx) files to common language runtime
binary (.resources) files that can be embedded in a runtime binary executable or compiled into satellite assemblies.
References: http://www.devcurry.com/2011/02/important-net-framework-40-command-line.html
QUESTION 24
You are developing an ASP.NET MVC application.
The application provides a RESTful API for third-party applications. This API updates the information for a contact by embedding the information in the URL of an
HTTP POST.
You need to save the Contact type when third-party applications use the EditContact method.
Which code segment should you use? {Each correct answer presents a complete solution. Choose all that apply.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: BC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
REST stands for Representational State Transfer, it is a simple stateless architecture that runs over HTTPwhere each unique URL is representation of some
resource. There are four basic design principles which should be followed when creating RESTful service:
Use HTTP methods (verbs) explicitly and in consistent way to interact with resources (Uniform Interface), i.e. to retrieve a resource use GET, to create a
resource use POST, to update a resource use PUT/PATCH, and to remove a resource use DELETE. Etc.
QUESTION 25
You are designing a data-oriented application that features a variety of storage schemas.
The application object model must be mapped to the various storage schemas.
Which ADO.NET data access strategy should you use? (Each correct answer presents a complete solution. Choose all that apply.)
A. LINQ to SQL
B. Entity Framework
C. DataAdapter
D. DataReader
QUESTION 26
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You are developing an ASP.NET MVC application that provides instant messaging capabilities to customers.
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
QUESTION 27
You are developing an ASP.NET MVC application that uses forms authentication to verify that the user is logged in.
You need to ensure that user credentials are persisted after users log on.
In which two locations can you store the credentials? Each correct answer presents a complete solution.
Correct Answer: AB
Section: [none]
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Explanation:
Server sessions and cookies can both be configured to secure and they both persist after the users log on.
Incorrect Answers:
C: ViewData's life only lasts during current http request.
D: TempData is a bucket where you can dump data that is only needed for the following request. That is, anything you put into TempData is discarded after the
next request completes.
QUESTION 28
You are developing an ASP.NET MVC application that uses forms authentication. The application uses SQL queries that display customer order data.
Logs show there have been several malicious attacks against the servers.
You need to prevent all SQL injection attacks from malicious users against the application.
A. Check the input against patterns seen in the logs and other records.
B. Escape single quotes and apostrophes on all string-based input parameters.
C. Implement parameterization of all input strings.
D. Filter out prohibited words in the input submitted by the users.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Prepared statements ensure that anattacker is not able to change the intent of a query, even if SQL commands are inserted by an attacker.
QUESTION 29
You are developing an ASP.NET MVC application that uses forms authentication against a third-party database.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to authenticate the users.
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
ASP.NET membership is designed to enable you to easily use a number of different membership providers for your ASP.NET applications.
There are two primary reasons for creating a custom membership provider.
You need to store membership information in a data source that is not supported by the membership providers included withthe .NET Framework, such as a
FoxPro database, an Oracle database, or other data sources.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to manage membership information using a database schema that is different from the database schema used by the providers that ship with the .NET
Framework.
To implement a membership provider, you create a class that inherits the MembershipProvider abstract class from the System.Web.Security namespace.
Incorrect:
Not C: Class ProviderBase
The provider model is intended to encapsulate all or part of the functionality of multiple ASP.NET features, such as membership, profiles, and protected
configuration.
References: https://msdn.microsoft.com/en-us/library/f1kyba5e.aspx
QUESTION 30
You are designing an enterprise-level Windows Communication Foundation (WCF) application. User accounts will migrate from the existing system. The new
system must be able to scale to accommodate the increasing load.
You need to ensure that the application can handle large-scale role changes.
Correct Answer: BC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
In the advanced level of maturity for authorization, role storage and management is consolidated and authorization itself is a service available to any solution that is
service-enabled.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The Trusted Subsystems Model
Once authorization is available as an autonomous service, the need for impersonation is eliminated. Instead of assuming the identity of the user, the application
uses its own credentials to access services and resources, but it captures the user's identity and passes it as a parameter (or token) to be used for authorization
when a request is made. This model is referred to as the trusted subsystem model, because the application acts as a trusted subsystem within the security
domain.
QUESTION 31
You are developing an ASP.NET MVC application to be used on the Internet. The environment uses Active Directory with delegation to access secure resources.
Users must be able to log on to the application to maintain their personal preferences.
You need to use the least amount of development effort to enable users to log on.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Enable Forms authentication
B. Enable Windows authentication
C. Generate server SSL certificates and install them in IIS
D. Enable Digest authentication
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Delegation relies on Integrated Windows authentication to access resources. There is no limit on the number of computers that you can delegate your account -you
must correctly configure each of them. The Integrated Windows authentication method works only if the following two conditions exist:
You set up your network to use the Kerberos authentication protocol that requires Active Directory.
You set up the computers and accounts on your network as trusted for delegation. References:
https://support.microsoft.com/en-us/kb/810572
QUESTION 32
You are developing a controller for an ASP.NET MVC application that manages message board postings.
The security protection built in to ASP.NET is preventing users from saving their HTML.
You need to enable users to edit and save their HTML while maintaining existing security protection measures.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
[ValidateInput(false)]
[HttpPost]
public ActionResult AddArticle(BlogModel blog)
{
if (ModelState.IsValid)
{
...
}
return View();
}
}
References: http://www.dotnettricks.com/learn/mvc/html-submission-by-validateinput-and-allowhtml-attribute-in-mvc4
QUESTION 33
You are designing an MVC web application.
The view must be as simple as possible for designers who do not have a technical background.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to combine two existing models to meet the requirement.
A. View
B. View Model
C. Controller
D. Model
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 34
You are developing an application that uses many small images for various aspects of the interface.
The application responds slowly when additional resources are being accessed.
A. Preload all the images when the client connects to ensure that the images are cached.
B. Combine all the images into a single image and use CSS to create sprites.
C. Host all images on an alternate server and provide a CDN.
D. Convert the images to .png file format and stream all images on a single connection.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 35
You are developing an ASP.NET MVC application that enables you to edit and save a student object.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application must not retrieve student objects on an HTTP POST request.
Which code segment should you use? Each correct answer presents a complete solution. A.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
B. C.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D.
Correct Answer: CD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
C: This is the default MVC implementation of having separate methods for GET and POST via function overloading.
D: We retrieve the GET and POST methods through this.HttpContext.Request.RequestType.
Incorrect:
Not A: We retrieve the GET and POST methods through this.HttpContext.Request.RequestType, not through this.HttpContext.Request["ActionName"].
QUESTION 36
You are implementing a website redesign of an existing website that provides historical weather condition maps.
The current layout resembles the graphic in the exhibit. (Click the Exhibit button.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Year selection is implemented as a set of links, which causes the page to reload when the user changes the year. The year selection HTML is contained in a div
with an id of "year-selector".
You need to modify the page so that the user can change the year without the page reloading.
You also need to ensure that there is minimal change to the design of the page.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
B. Option B
C. Option C
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
References: http://www.html5tutorial.info/html5-range.php
QUESTION 37
You are designing a localized ASP.NET MVC online shopping application that will be deployed to customers in the United States, China, France, and Brazil. The
application must support multiple cultures so that content in the appropriate language is available in each area.
You need to ensure that the content can be viewed in several languages.
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
A resource file is an XML file that contains the strings that you want to translate into different languages or paths to images. The resource file contains key/value
pairs. Each pair is an individual resource. Key names are not case sensitive. For example, a resource file might contain a resource with the key Button1 and the
value Submit.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You create a separate resource file for each language (for example, English and French) or for a language and culture (for example English [U.K.], English [U.S.]).
Each localized resource file has the same key/value pairs; the only difference is that a localized resource file can contain fewer resources than the default resource
file. The built-in language fallback process then handles loading the neutral or default resource.
QUESTION 38
You are designing an enterprise-level Windows Communication Foundation (WCF) application. User accounts will migrate from the existing system. The new
system must be able to scale to accommodate the increasing load.
The new servers are experiencing significant stress under load of large-scale role changes.
You need to ensure that the application can handle the stress.
Which authorizations should you redesign? (Each correct answer presents a complete solution. Choose all that apply.)
A. Role-based approach
B. Identity-based approach
C. Resource-based trusted subsystem model
D. Resource-based impersonation/delegation model
Correct Answer: AC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
* The Trusted Subsystems Model
Once authorization is available as an autonomous service, the need for impersonation is eliminated. Instead of assuming the identity of the user, the application
uses its own credentials to access services and resources, but it captures the user's identity and passes it as a parameter (or token) to be used for authorization
when a request is made. This model is referred to as the trusted subsystem model, because the application acts as a trusted subsystem within the security
domain.
QUESTION 39
You are designing am ASP.NET Core MVC application.
The application must store secure information that is specific to an individual user. The data must be automatically purged when the user logs off.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Session state
B. Database storage
C. Profile properties
D. Application state
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless
protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that
were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a
way to persist variable values for the duration of that session.
References: https://msdn.microsoft.com/en-us/library/ms178581.aspx
QUESTION 40
You are designing a localized ASP.NET application to support multiple cultures.
You need to ensure that the application can be displayed in several languages.
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 41
You are implementing a website redesign of an existing website that provides historical weather condition maps. The current layout resembles the following
graphic.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Year selection is implemented as a set of links, which causes the page to reload when the user changes the year. The year selection HTML is contained in a div
with an id of "year-changer".
You need to modify the page so that the user can change the year without the page reloading. You also need to ensure that there is minimal change to the design
of the page.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
jQuery code will bind the slider control to the div.
$(document).ready(function(){
$("#slider").slider();
});
Now, when you run this page then you will see a long slider on page with no range. As we have not specified any range.slider control comes with various options/
properties which can be set. Here are few of them.
1. min : Minimum value allowed for the slider.
2. max : Maximum allowed value for the slider.
3. step : How much you want to increment when you slide. Default is 1.
4. value : set default value of the slider.
QUESTION 42
You need to enable client-side validation for an ASP.NET MVC application.
Which three actions should you perform? Each correct answer presents part of the solution.
A. Attach a custom validation attribute to the model properties that the view uses.
B. Reference the jquery, jquery.validate and jquery.validate.unobtrusive script files in the view.
C. Open the web.config file at the project root, and set the values of the ClientValidationEnabled and UnobtrusiveJavaScriptEnabled keys to True.
D. For each form element, use the Validator.element() method to validate each item.
E. Add data annotations to the model properties that the view uses.
Explanation/Reference:
Explanation:
B: The validation can be implemented using jQuery and jQuery validation plug-in (jquery.validate.min.js and jquery.validate.unobtrusive.min.js).
C: When you are developing an MVC application in Visual Studio then the client-side becomes enabled by default, but you can easily enable or disable the writing
of the following app setting code snippet in the web.config file.
<configuration>
<appSettings>
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
</configuration>
E: The jQuery validation plug-in takes advantage of the Data Annotation attributes defined in the model, which means that you need to do very little to start using it.
QUESTION 43
You develop an ASP.NET MVC application. The application has a controller named PeopleController.cs. The controller has an action method that returns a parent
view. The parent view includes the following code. Line numbers are included for the reference only.
The application also contains a partial view named People. The parent view must display the partial view.
You need to add code at line 09 to display the partial view within the parent view.
Which two code segments will achieve the goal? Each correct answer presents a complete solution.
A. @{ Html.RenderPartial(“People”, Model);}
B. @Html.Partial(“People”, Model)
C. @Html.Display(“People”, Model)
D. @Html.Raw(“People”)
Correct Answer: AB
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
By default, any partial view rendered bycalling @Html.Partial("PartialViewName") will get the view model passed to the parent view.
QUESTION 44
You are developing an ASP.NET MVC application that will run on Azure.
The application uses Event Tracing for Windows (ETW) for logging operations.
You need to retrieve the ETW data for the application from a deployed Azure instance by using the Azure Diagnostics API.
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Azure Diagnostics 1.2 and 1.3 are Azure extensions that enable you to collect diagnostic telemetry data from a worker role, web role, or virtual machine running in
Azure.
Diagnostics 1.2 and 1.3 enable the collection of ETW and .NET EventSource events.
Example:
EtwProviders>
<EtwEventSourceProviderConfiguration provider="SampleEventSourceWriter" scheduledTransferPeriod="PT5M">
<Event id="1" eventDestination="EnumsTable"/>
<Event id="2" eventDestination="MessageTable"/>
<Event id="3" eventDestination="SetOtherTable"/>
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
</EtwProviders>
Reference: Enabling Diagnostics in Azure Cloud Services and Virtual Machines https://azure.microsoft.com/sv-
se/documentation/articles/cloud-services-dotnet-diagnostics/
QUESTION 45
You are developing an Azure worker role. You enable crash dump collection for the role.
You need to download the crash dump to determine why the application stops responding.
From which two locations can you download the crash dump? Each correct answer presents a complete solution.
Correct Answer: AD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
When you enable collection of crash dumps, the resulting data is written to the CrashDumps directory in the DiagnosticStore local resource that is automatically
configured for your role.
When crash dump data is transferred to persistent storage, it is stored to the wad-crash-dumps Blob container.
QUESTION 46
DRAG DROP
You are developing an ASP.NET web application that uses health monitoring to log events to the Windows Event Log. The application contains a custom event
that is defined in the following code segment. Line numbers are included for reference only.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to ensure that the event is correctly added to the Windows event log.
How should you complete the relevant code? To answer, drag the appropriate code segment to the correct location or 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.
Correct Answer:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference:
Explanation:
ApplicationDetailCodeBase: Identifies the offset for the applicationdetail event codes. This field is constant.
WebRequestEvent.Raise()
Raises an event by notifying any configured provider that the event has occurred. (Inherited from WebBaseEvent.) https://msdn.microsoft.com/en-
us/library/system.web.management.webrequestevent(v=vs.110).aspx
QUESTION 47
You are developing an application that uses many small images.
A. Preload all the images when the application starts to ensure that the images are cached.
B. Convert the images to ICO file format and stream all images on a single connection.
C. Host all images on a Microsoft Azure web role with multiple instances.
D. Combine all the images into a single image and use CSS to create sprites.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Because browsers limit how many concurrent HTTP requests they make to a website, a web page with many small icon images can result in a longer load time.
You can combine many small images into a single larger image - a CSS sprite - using the free ASP.NET Sprite and Image Optimization Library available from
Microsoft.
Reference: CSS Sprites and the ASP.NET Sprite and Image Optimization Library
http://dotnetslackers.com/articles/aspnet/CSS-Sprites-and-the-ASP-NET-Sprite-and-Image-Optimization-Library.aspx
QUESTION 48
You are developing an ASP.NET MVC application that uses forms authentication against an Oracle database.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
When implementing a custom membership provider, you are required to inherit the MembershipProvider abstract class.
There are two primary reasons for creating a custom membership provider.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to store membership information in a data source that is not supported by the membership providers included with the .NETFramework, such as a
FoxPro database, an Oracle database, or other data source.
You need to manage membership information using a database schema that is different from the database schema used by the providers that ship with the .NET
Framework. A common example of this would be membership data that already exists in a SQL Server database for a company or Web site.
QUESTION 49
You are developing an ASP.NET MVC application that uses forms authentication. The application uses SQL queries that display customer order data.
You need to prevent all SQL injection attacks against the application.
A. Implement parameterization.
B. Pattern check the input.
C. Filter out prohibited words in the input.
D. Escape single quotes on string-based input parameters.
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
With most development platforms, parameterized statements that work with parameters can be used (sometimes called placeholders or bind variables) instead of
embedding user input in the statement. A placeholder can only store a value of the given type and not an arbitrary SQL fragment. Hence the SQL injection would
simply be treated as a strange (and probably invalid) parameter value.
Reference: https://en.wikipedia.org/wiki/SQL_injection#Parameterized_statements
QUESTION 50
You are developing a new ASP.NET MVC application that will be hosted on Microsoft Azure. You need to implement caching.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The cache must offer a large amount of space for cached content.
You must be able to share output cache content across web server instances.
A. ASP.NET Caching
B. Azure In-Role Cache
C. Azure Redis Cache
D. Azure Managed Cache Service
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 51
You are developing an ASP.NET application that allows users to download Microsoft Azure log files. You need to improve the performance of the application.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Bundling is a new feature in ASP.NET 4.5 that makes it easy to combine or bundle multiple files into a single file. You can create CSS, JavaScript and other
bundles. Fewer files means fewer HTTP requests and that can improve first page load performance.
References: https://www.asp.net/mvc/overview/performance/bundling-and-minification
QUESTION 52
You are developing an ASP.NET MVC application that uses forms authentication. The user database contains a user named OrderAdmin.
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
B.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
C.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D.
Correct Answer: BD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
With MVC4 a new attribute has been introduced, namely the [AllowAnonymous] attribute. Together with the [Authorize] attribute, you can now take a white-list
approach instead. The white-list approach is accomplished by dressing the entire controller with the [Authorize] attribute, to force authorization for all actions within
that controller. You can then dress specific actions, that shouldn't require authorization, with the [AllowAnonymous] attribute, and thereby white-listing only those
actions. With this approach, you can be confident that you don't, by accident, forget to dress an action with the [Authorize], leaving it available to anyone, even
though it shouldn't.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
References: http://stackoverflow.com/questions/9727509/how-to-allow-an-anonymous-user-access-to-some-given-page-in-mvc
QUESTION 53
You are building an ASP.NET web application.
You must test the web application in multiple browsers at the same time.
You need to ensure that the application can use the Browser Link feature.
Which two actions should you perform? Each correct answer presents part of the solution.
A. In the web.config file, set the value of the debug attribute to False.
B. In the web.config file, set the value of the debug attribute to True.
C. Enable Browser link.
D. Use an external editor for webpages.
E. Enable source control server support.
Correct Answer: BC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
References: https://www.asp.net/visual-studio/overview/2013/using-browser-link
QUESTION 54
You are developing an ASP.NET MVC application that delivers real-time game results to sports fans. The application includes the following code. Line numbers are
included for reference only.
The source data for the game results is updated every 30 seconds.
Testers report the following issues with the application:
They report seeing other user's name when they sign in to the application.
They report delays in seeing the latest game results.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Which two changes should you make to the code? Each correct answer presents part of the solution.
A. Replace the code at line 07 with the following codesegment:[OutputCache(Duration = 30, VaryByParam = “none”, Location = OutputCacheLocation.Client,
NoStore = true)]
B. Replace the code at line 12 with the following code segment:[OutputCache(Duration = 30, VaryByParam = “none”, Location = OutputCacheLocation.Server,
NoStore = true)]
C. Replace the code at line 07 with the following code segment:[OutputCache(Duration = 3600, VaryByParam = “none”, Location = OutputCacheLocation.Server,
NoStore = false)]
D. Replace the code at line 12 with the following code segment:[OutputCache(Duration = 3600, VaryByParam = “none”, Location = OutputCacheLocation.Client,
NoStore = true)]
Correct Answer: AB
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
B: They report delays in seeing the latest game results. This is the output of the GetResults() function. We decrease the Duration in the cache for this function from
3600 to 30. This is one line 12.
A: They report seeing other user's name when they sign in to the application. This is the output of the GetUserInfo() function. We should change the
OutputCacheLocation ofthe caching of this function from Server to Client. This is on line 7.
Note: The OutputCacheLocation.Client option indicates that the content should be cached at the requesting client. Any requests for the same resource made from
the same client within the expiry period, will be served out the client’s cache, without a network request being made to the server.
The OutputCacheLocation.Server option indicates that the content will be cached at the origin server. This content will be served for subsequent requests made by
the initial client and any other client requesting the same resource within the expiry period.
References: https://growlycode.wordpress.com/2014/01/10/mvc4-outputcache-location-basics/
QUESTION 55
You deploy an ASP.NET MVC Web application to Internet Information Services (IIS). The application has a secure area that provides access to custom reports.
You must develop custom business logic to support the reports. The custom business logic has the following requirements:
You must be able to quickly modify and deploy updates to the business logic.
A. Update the report logic to include the custom business logic. Use WebDAV to publish the reports to the server.
B. Develop a new HTTP module that includes the custom business logic. Deploy the HTTP module to IIS.
C. Develop a new HTTP handler that includes the custom business logic. Deploy the HTTP handler to IIS.
D. Develop a new ISAPI filter that includes the custom business logic. Deploy the ISAPI filter to IIS.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
An ASP.NET HTTP handler is the process that runs in response to a request that is made to an ASP.NET Web application.
ASP.NET maps HTTP requests to HTTP handlers based on a file name extension.
Incorrect:
Not B: HTTP modules differ from HTTP handlers. An HTTP handler returns a response to a request that is identified by a file name extension or family of file name
extensions. In contrast, an HTTP module is invoked for all requests and responses. It subscribes to event notifications in the request pipeline and lets you run code
in registered event handlers.
References: https://msdn.microsoft.com/en-us/library/bb398986.aspx
QUESTION 56
You are developing an ASP.NET MVC application to be used on the Internet. The environment does not use Active Directory.
Users must be able to log on to the application to maintain their personal preferences.
You need to use the least amount of development effort to enable users to log on.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Many Web applications require a way to restrict access to some resources (such as specific pages) so that those resources are accessible only to authenticated
users. The default Web application project template for ASP.NET MVC provides a controller, data models, and views that you can use to add ASP.NET forms
authentication to your application. The built-in functionality lets users register, log on and off, and change their password. For many applications, this functionality
provides a sufficient level of user authentication.
Incorrect:
Not B: Windows authentication would require an Active Directory.
Windows authentication method works only if the following two conditions exist:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You set up your network to use the Kerberos authentication protocol that requires Active Directory.
You set up the computers and accounts on your network as trusted for delegation. References:
https://msdn.microsoft.com/en-us/library/ff398049(VS.98).aspx
QUESTION 57
You are developing an ASP.NET MVC application that will run in a shared environment.
The application requests the user's password, and then uses the password to sign data.
You need to minimize the potential for the password to be discovered by other processes that run in the shared environment. What should you do?
A. Add the SecuritySafeCriticalAttribute attribute to the methods which process the password.
B. Store the password in a SecureString instance.
C. Encrypt the password on the web page, and decrypt the password in the MVC application.
D. Run the code that processes the password in its own AppDomain.
Correct Answer: D
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Application domains provide a unit of isolation for the common language runtime. They are created and run inside a process. Application domains are usually
created by a runtime host, which is an application responsible for loading the runtime into a process and executing user code within an application domain. The
runtime host creates a process and a default application domain, and runs managed code inside it. Runtime hosts include ASP.NET, Microsoft Internet Explorer,
and the Windows shell.
For most applications, you do not need to create your own application domain; the runtime host creates any necessary application domains for you. However, you
can create and configure additional application domains if your application needs to isolate code or to use and unload DLLs.
References: https://msdn.microsoft.com/en-us/library/yb506139(v=vs.110).aspx
QUESTION 58
The application includes the following method. (Line numbers are included for reference only.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
When users attempt to retrieve a product from the product page, a run-time exception occurs if the product does not exist.
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 59
You develop an ASP.NET MVC application. The application is configured for claims-based authentication by using Windows Identity Foundation (WIF).
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to access the claims in the WIF token.
A. Thread.CurrentPrincipal.Identity;
B. ((IClaimsPrincipal)Thread.CurrentPrincipal).Identities[0].Claims;
C. Thread.CurrentPrincipal;
D. ((IClaimsPrincipal)Thread.CurrentPrincipal).Identities[0].IsAuthenticated;
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
// Access claims
foreach(Claim claim in claimsIdentity.Claims)
{
...
}
}
References: https://msdn.microsoft.com/en-us/library/ee517271.aspx
QUESTION 60
You are developing an ASP.NET MVC application.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application has a contact view includes a form for editing the displayed contact.
You need to save the Contact object model when the form is posted back to the EditContact method using a POST method request.
Which code segment should you use? Each correct answer presents a complete solution. Choose all that apply.
A.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
B. C.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D.
Correct Answer: AB
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 61
You are developing an ASP.NET MVC application. The application uses a set of custom exceptions to log errors that occur during the execution of an
action. You need to develop a class that implements logging. Which interface should you implement?
A. IExceptionFilter
B. IActionFilter
C. IClientValidatable
D. IResultFilter
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Exception filters are used to apply global policies to unhandled exceptions in the MVC app.
Exception Filters implement either the IExceptionFilter or IAsyncExceptionFilter interface.
Exception filters handle unhandled exceptions, including those that occur during controller creation and model binding. They are only called when an exception
occurs in the pipeline.
QUESTION 62
HOTSPOT
You are developing an ASP.NET MVC application to display product information. The application has two views. The first view displays a list of product names.
When you select a product name, the second view shows detailed information for the product that is selected. The product detail view receives a query string value
that contains as identifier for the product that is selected.
The product controller for the application has the following requirements:
The product list and product details must use output caching.
The list of products must be cached daily.
The product details view must cache data for one hour, based on the product that is selected.
How should you complete the relevant code? To answer, select the appropriate code from each list in the answer area.
Hot Area:
Correct Answer:
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Note: The Duration parameter is the time, in seconds, that the page oruser control is cached. Setting this attribute on a page or user control establishes an
expiration policy for HTTP responses from the object and will automatically cache the page or user control output.
The product details view must cache data for one hour, based on the product that is selected. One hour is 3600 seconds (60* 60).
References: https://msdn.microsoft.com/en-us/library/hdxfb6cy(v=vs.100).aspx
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 63
You create an ASP.NET MVC application. You host the application by using the Open Web Interface for .NET (OWIN). You run the following command by using the
NuGet Package Manager console: install-package Microsoft.AspNet.SignalR
You plan to implement real-time push notifications from the server using ASP.NET SignalR.
Which three steps should you perform? Each correct answer presents part of the solution.
Explanation/Reference:
Explanation:
A: In Solution Explorer, right-click the project, select Add | New Folder, and add a new folder named Hubs.
Right-click the Hubs folder, click Add | New Item, select the Visual C# | Web | SignalR node in the Installed pane, select SignalR Hub Class (v2) from the center
pane, and create a new hub named ChatHub.cs. You will use this class as a SignalR serverhub that sends messages to all clients.
C: Use the SignalR jQuery library in a web page to send messages and display updates from the hub.
References:https://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr-and-mvc
QUESTION 64
You are developing an ASP.NET MVC application. Devices that use many different browsers will use the application.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application must render properly in Internet Explorer 8 or later versions.
Correct Answer: BD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
B: If you want the viewport width to match the device’s physical pixels, you can specify the following:
For this to work correctly, you must not explicitly force elements to exceed that width (e.g., using a width attribute or CSS property), otherwise the browser will be
forced to use a larger viewport regardless.
D: Media queries in CSS3 extend the CSS2 media types idea: Instead of looking for a type of device, they look at the capability of the
device. Media queries can be used to check many things, such as: width and height of the viewport width and height of the device
orientation (is the tablet/phone in landscape or portrait mode?)
resolution
Using media queries are a popular technique for delivering a tailored style sheet to tablets, iPhone, and Androids.
References: https://www.asp.net/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-
application http://www.w3schools.com/css/css3_mediaqueries.asp
QUESTION 65
You are developing an ASP.NET MVC application. The application includes the following method. Line numbers are included for reference only.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
The application calls the GenerateMessage method before displaying each page.
A. Contract.Assume(userAgent !=null);
B. Contract.Requires(userAgent !=null);
C. Contract.Ensures(userAgent !=null);
D. Contract.Invariant(userAgent !=null);
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
There's "Microsoft Code Contracts" where you use syntax like Contract.Requires(obj != null) which gives you runtime and compile checking. Contract.Requires
specifies a precondition contract for an enclosing method or property.
Incorrect Answers:
A: Contract.Assume instructs code analysis tools to assume that the specified condition is true, even if it cannot be statically proven to always be true.
C: Contract.Ensures specifies a postcondition contract for the enclosing method or property.
D: Contract.Invariant specifies an invariant contract for the enclosing method or property, and displays a message if the condition for the contract fails.
References: https://msdn.microsoft.com/en-us/library/system.diagnostics.contracts.contract(v=vs.110).aspx
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 66
You are developing an ASP.NET MVC application. The application includes the following HomeController class. Line numbers are included for reference only.
During testing, all errors display an ASP.NET error page instead of the expected error view.
You need to ensure that the error view displays when errors occur.
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Enabling Custom Error Handling
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
To enable custom error handling for use by a HandleErrorAttribute filter, add a customErrors element to the system.web section of the application's Web.config file,
as shown in the following example:
<system.web>
<customErrors mode="On" defaultRedirect="Error" />
</system.web>
Note:
The HandleErrorAttribute attribute in ASP.NET MVC lets you specify how to handle an exception that is thrown by an action method. By default, when an action
method with theHandleErrorAttribute attribute throws any exception, MVC displays the Error view that is located in the ~/Views/Shared folder.
References: https://msdn.microsoft.com/en-us/library/system.web.mvc.handleerrorattribute(v=vs.118).aspx
QUESTION 67
You are developing an ASP.NET MVC application that will be deployed on local Internet Information Services (IIS) servers and on an Azure Web Role.
You must log events for the application when it is deployed locally and on Azure. You must not deploy additional services.
Which two technologies can you use? Each correct answer presents a complete solution.
A. event log
B. trace
C. console
D. named pipe
Correct Answer: AB
Section: [none]
Explanation
Explanation/Reference:
Explanation:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 68
Customers download videos by using HTTP clients that support various content encodings.
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Correct Answer: E
Section: [none]
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation:
A VaryByParam property with the value "VideoId". When different values of the Id parameter are passed to the controller action, different cached versions of the
Details view are generated.
It is important to understand that using the VaryByParam property results in more caching and not less. A different cached version of the Details view is created for
each different version of the Id parameter.
Semicolon list of parameters = Create different cached versions whenever any of the form or query string parameters in the list varies
References:
https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/controllers-and-routing/improving-performance-with-output-caching-cs
https://msdn.microsoft.com/en-us/library/system.web.mvc.outputcacheattribute_properties(v=vs.118).aspx
QUESTION 69
You are developing an ASP.NET application.
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Network bandwidth is a limited resource. Reducing the size of the response usually increases the responsiveness of an app, often dramatically. One way to reduce
payload sizes is to compress an app's responses. Use server-based response compression technologies in IIS, Apache, or Nginx.
References: https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?tabs=aspnetcore2x
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 70
You develop an ASP.NET MVC application. The application includes a web application configuration file that contains sensitive information.
A. ngen.exe
B. aspenet_wp.exe
C. regasm.exe
D. caspol.exe
E. aspnet_regis.exe
Correct Answer: E
Section: [none]
Explanation
Explanation/Reference:
Explanation:
You can use the ASP.NET IIS Registration Tool (Aspnet_regiis.exe) to encrypt or decrypt sections of a Web configuration file. ASP.NET will automatically decrypt
encrypted configuration elements when the Web.config file is processed.
References: http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx
QUESTION 71
You are developing an ASP.NET MVC application.
A. Kerberos
B. Windows
C. Forms
D. Basic
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation:
To use authentication through a membership database, you must first configure it for your site. The following are the basic steps you follow in order to configure
membership:
1. Specify membership options as part of your Web site configuration. 2.
Configure your application to use forms authentication
3. Define user accounts for membership.
References: https://msdn.microsoft.com/en-us/library/yh26yfzy.aspx
QUESTION 72
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing an ASP.NET Core MVC web application. The landing page of the application contains over 100 small JPEG images, including many images
that have embedded text.
Mobile device users report performance issues when loading the page. You debug the application and determine that the number of HTTP requests is causing the
issue.
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Compressing the images does not reduce the number of HTTP requests.
QUESTION 73
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
The application must be exposed to external users over ports 80 and 443 and must meet the following requirements:
Solution: You deploy the application to Kestrel with an IIS reverse proxy.
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
QUESTION 74
You develop an ASP.NET MVC application. The application has several Razor views.
The application must execute different server-side code for desktop and mobile devices.
Which two approaches can you use? Each correct answer presents a complete solution.
A. Use different controllers and view for both desktop and mobile browsers, but render the views using Bootstrap framework.
B. Create separate areas for desktop and mobile browsers, implementing independent controllers and views for each.
C. Use the same controllers for both desktop and mobile browsers, but render different views depending on the device type.
D. Use different controllers and views for both desktop and mobile browsers, but render the views with the same Razor layout depending on the device type.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: BD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
How ASP.NET MVC applications can present mobile-specific pages
Since the Model-View-Controller pattern decouples application logic (in controllers) from presentation logic (in views), you can choose from any of the following
approaches to handling mobile support in server-side code:
1. Create separate areas for desktop and mobile browsers, implementing independent controllers and views for each. This option works best if you're displaying
very different screens, containing different information and leading the user through different workflows optimized for their device type. It may mean some
repetition of code, but you can minimize that by factoring out common logic into an underlying layer or service.
2. Use the same controllers for both desktop and mobile browsers, but render different views depending on the device type. This option works best if you're
displaying roughly the same data and providing the same workflows for end users, but want to render very different HTML markup to suit the device being used.
3. Use the same controllers and views for both desktop and mobile browsers, but render the views with different Razor layouts depending on the device type. This
option works best if you're displaying identical data on all devices, but simply want to supply different CSS stylesheets or change a few top-level HTML
elements for mobiles.
References: https://docs.microsoft.com/en-us/aspnet/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application
QUESTION 75
You are maintaining an ASP.NET MVC application that runs on Azure. Remote debugging is enabled for this role, but the input endpoints for remote debugging
have been removed for security reasons. You do not have permission to view the Azure Portal for this deployment. You can log on by using Remote Desktop
Protocol (RDP).
A. C:\Config\<GUID>.ccf
B. E:\entrypoint.txt
C. E:\ <GUID>.csman
D. C:\Config\<DeploymentD>.WebRole.1xml
Correct Answer: C
Section: [none]
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
QUESTION 76
You are developing an ASP.NET application that runs on Windows Server 2012.
An exception is preventing a page from rendering.
You need to view the trace information for the page.
Which two actions should you perform? Each correct answer presents part of the solution.
A. Add the following markup segment to the web.config file: <trace mostRecent= “true/”>
B. Load the trace.axd page from the root of the website.
C. Add the traceEnable element to the Internet Information Service (IIS) Metabase section for the application.
D. Add the following markup segment to the web.config file: <trace enabled= “true/”>
Correct Answer: BD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
D: You can control whether tracing is enabled or disabled for individual pages. If tracing is enabled, when the page is requested, ASP.NET appends to the page a
series of tables containing execution details about the page request. Tracing is disabled by default.
For example, if the URL for your application is http://localhost/SampleApplication, navigate to http://localhost/SampleApplication/trace.axd to view the trace
information for that application.
Select the View Details link for the request that you want to investigate.
References: https://msdn.microsoft.com/en-us/library/94c55d08.aspx
https://msdn.microsoft.com/en-us/library/wwh16c6c.aspx
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 77
You are designing a distributed application.
The application must store a small amount of information that is shared across all users and does not change frequently.
Which server-side state management options will achieve the goal? Each correct answer presents a complete solution. Choose all that apply.
A. Database support
B. Profile properties
C. Session state
D. Application state
Correct Answer: AD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
A: SQL Database provides a relational database management system for Windows Azure and is based on SQL Server technology. With a SQL Database instance,
you can easily provision and deploy relational database solutions to the cloud, and take advantage of a distributed data center that provides enterprise-class
availability, scalability, and security with the benefits of built-in data protection and self-healing.
D: Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than
storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions.
Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another.
Incorrect Answers:
B: Profile properties stores personal, not global, information.
C: Session state is not global. Session states handles user information such as cookies, hidden fields, and query strings are some client-side options to tracking
user state
D: Application State does not exist in Azure.
QUESTION 78
You are developing an ASP.NET MVC application that uses forms authentication. The user database contains a user named LibraryAdmin.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You have the following requirements:
You must allow all users to access the GetBook method.
You must restrict access to the EditBook method to the user named LibraryAdmin.
Which code segment should you use? (Each correct answer presents a complete solution. Choose all that apply.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: AC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
QUESTION 79
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET web application that is self-hosted using Open Web Interface for .NET (OWIN) in a Microsoft Azure Worker role.
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Note: Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applications. OWIN decouples the web application from
the server, which makes OWIN ideal for self-hosting a web application in your own process, outside of IIS–for example, inside an Azure worker role.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 80
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET web application that is self-hosted using Open Web Interface for .NET (OWIN) in a Microsoft Azure Worker role.
A. Yes
B. No
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/host-owin-in-an-azure-worker-
role
QUESTION 81
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET web application that is self-hosted using Open Web Interface for .NET (OWIN) in a Microsoft Azure Worker role.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Traditional ASP.NET (up to MVC 5) is tightly coupled to IIS through System.Web.dll. ASP.NET Core provides a separation between the web server and your web
application. This allows web applications to be portable between different web servers and also allows web servers to be self-hosted, which means you can start a
web server in your own process, as opposed to a process that is owned by dedicated web server software such as IIS.
Reference: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-aspnetcore
QUESTION 82
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET Core MVC web application. You have a legacy business system that sends data to the web application by using Web API. The legacy
business system uses proprietary data formats.
Solution: Add a custom formatter class to the Web API and implement the IOutputFormatter interface.
A. Yes
B. No
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
References: https://www.c-sharpcorner.com/article/custom-formatters-in-asp-net-core-mvc-web-api/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 83
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET Core MVC web application. You have a legacy business system that sends data to the web application by using Web API. The legacy
business system uses proprietary data formats.
Solution: Add an instance of a custom formatter class to the InputFormatters collection in MVC.
A. Yes
B. No
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
References: https://www.c-sharpcorner.com/article/custom-formatters-in-asp-net-core-mvc-web-api/
QUESTION 84
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET Core MVC web application. You have a legacy business system that sends data to the web application by using Web API. The legacy
business system uses proprietary data formats.
Solution: Add an instance of a custom formatter class to the OutputFormatters collection in MVC.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
We need to add the custom formatter class to the InputFormatters collection in MVC.
References: https://www.c-sharpcorner.com/article/custom-formatters-in-asp-net-core-mvc-web-api/
QUESTION 85
You define a startup task in the ServiceDefinition.csdef file. The task consists of a batch file that runs a Windows PowerShell script. The script places configuration
files in local storage for use in a worker role. The worker role needs this information before starting.
The worker role does not start after the startup task runs.
A. Use environment variables based on members of the RoleEnvironment class instead of static environment variables.
B. Configure the task to use the directory specified by the TEMP environment variable.
C. Ensure the task completes with an errorlevel of 0.
D. Change the task from simple to foreground.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Startup tasks must end with an errorlevel (or exit code) of zero for the startup process to complete. If a startup task ends with a non-zero errorlevel, the role will not
start.
Note: Startup tasks are actions that are taken before your roles begin and are defined in the ServiceDefinition.csdef file by using the Task element within the
Startup element. Frequently startup tasks are batch files, but they can also be console applications, or batch files that start PowerShell scripts.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Reference: https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-startup-tasks
QUESTION 86
You are developing an ASP.NET Core MVC web application that will be deployed to Microsoft Azure App Services Web App.
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
References: https://blogs.msdn.microsoft.com/mvpawardprogram/2017/05/16/deploy-app-azure-app-service/
QUESTION 87
DRAG DROP
You plan to deploy an ASP.NET Core MVC web application to a Docker container. The root folder for the web application folder has a Windows PowerShell script
named publish.ps1. The script contains the following code:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
How should you complete the 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.
Correct Answer:
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Example:
FROM microsoft/aspnetcore
WORKDIR /app
COPY --from=builder /app .
ENTRYPOINT ["dotnet", "myapp.dll"]
Box 1: aspnetcore
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
From the DockerFile, you specify what base Docker image you'll be using (like using "FROM microsoft/dotnet:1.0.0-core").
Box 2: env:BuildType$
Box 3: dotnet
Reference: https://github.com/aspnet/aspnet-docker/blob/master/README.aspnetcore-build.md
QUESTION 88
You are developing an ASP.NET Core MVC web application that provides assets to external websites including images, JavaScript scripts and text files.
The external websites must be able to make full use of assets provided to them by the web application, including JavaScript asynchronous HTTP requests.
Pages that refer to the images and text files do not load. External websites are unable to use assets.
A. Add a MVC controller and action to load the files from the folder.
B. In the startup Configure method, call IApplicationBuilder. Use StaticFiles for the folder that contains the files.
C. In the startup ConfigureServices method, call IServiceCollection. Add DirectoryBrowser for the folder that contains the files.
D. Mark vendor provided files as content and set the value for Copy to Output Directory to CopyAlways
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-2.1&tabs=aspnetcore2x
QUESTION 89
You are developing an application that uses ASP.NET Core Identity for authorization. The application must use an existing Microsoft Azure Table Storage instance
to store user information. You create a custom UserStore class.
Which two interfaces should you implement? Each correct answer presents part of the solution.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. IUserSecurityStampStore
B. IUserLoginStore
C. IQueryableUserStore
D. IUserStore
E. IUserPasswordStore
Correct Answer: BD
Section: [none]
Explanation
Explanation/Reference:
Explanation:
D: Create a UserStore class that provides the methods for all data operations on the user. This class is equivalent to the UserStore class. In your UserStore class,
implement IUserStore<TUser> and the optional interfaces required. You select which optional interfaces to implement based on the functionality provided in your
app.
References: https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-custom-storageQQ-providers?view=aspnetcore-2.1
QUESTION 90
You are designing an ASP.NET Core MVC application that handles multiple customers. A user may log on to the site to perform activities such as checking
balances, performing transactions, and other activities that must be done securely.
The application must store secure information that is specific to an individual user. The data must be automatically and securely purged when the user logs off.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
QUESTION 91
You are designing a ASP.NET Core MVC application that runs on the Microsoft Azure platform.
The application must store a small amount of information that is shared across all users and does not change frequently.
Which server-side state management options will achieve the goal? Each correct answer presents a complete solution.
A. HTTP Cookie
B. Azure SQL Database
C. ASP.NET session state
D. ASP.NET application state
Correct Answer: BD
Section: [none]
Explanation
Explanation/Reference:
QUESTION 92
You have a class that includes the following code. (Line numbers are included for reference only.)
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You must enforce the following requirements for the actions:
Which three actions should you perform? Each correct answer presents part of the solution.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
E. Add the following code segment at line 17:
Explanation/Reference:
References: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-2.1
QUESTION 93
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing an ASP.NET Core MVC web application. The landing page of the application contains over 100 small JPEG images, including many images
that have embedded text.
Mobile device users report performance issues when loading the page. You debug the application and determine that the number of HTTP requests is causing the
issue.
A. Yes
B. No
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
Converting the images to Scalable Vector Graphics (SVG) does not reduce the number of HTTP requests.
QUESTION 94
You are developing an ASP.NET Core MVC web application.
You write a GULP task to automatically minify and upload JavaScript, CSS, and image files to Microsoft Azure CDN.
You need to ensure that the minification and upload tasks run automatically after every build in Microsoft Visual Studio Professional.
https://vceplus.com/
Correct Answer: E
Section: [none]
Explanation
Explanation/Reference:
References: https://blogs.msdn.microsoft.com/webdev/2016/01/06/task-runners-in-visual-studio-2015/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
QUESTION 95
You are developing an ASP.NET Core MVC web application.
The application includes a C# type named InsuranceID that represents an insurance policy identifier for a customer. Each instance of InsuranceID is five
alphanumeric characters followed by a dash and then four numbers (for example, ab12x-2323).
You need to ensure that Controller actions can accept values of type InsuranceID.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
QUESTION 96
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET Core MVC web application. You have a legacy business system that sends data to the web application by using Web API. The legacy
business system uses proprietary data formats.
Solution: Add a custom formatter class to the Web API and implement the IInputFormatter interface.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
A. Yes
B. No
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/aspnet/core/web-api/advanced/custom-formatters?view=aspnetcore-
2.1 https://www.c-sharpcorner.com/article/custom-formatters-in-asp-net-core-mvc-web-api/
QUESTION 97
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
The application must be exposed to external users over ports 80 and 443 and must meet the following requirements:
Solution: You deploy the application to a Windows server that runs Kestrel with a default Nginx reverse proxy.
A. Yes
B. No
Correct Answer: B
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference:
QUESTION 98
You develop a web application locally in Microsoft Visual Studio. You use the App Service Kudu deployment engine.
Change to the online repository are not automatically reflected in the web application.
You need to ensure that changes to the application will be deployed automatically.
A. Create a .gitignore file and remove tracking from the ignored files.
B. Create a new Git origin for the project.
C. Remove the .sln file from the online repository.
D. Set up continuous deployment options in VSTS to match the options in Microsoft Azure App Services.
Correct Answer: D
Section: [none]
Explanation
QUESTION 99
Your company uses Microsoft Azure DevTest Labs for testing applications.
The DevTest Labs environment must provide a preconfigured base image for a virtual machine that can be used for all development efforts. The virtual machine
must be able to be reproduced in various environments.
A. custom images
B. Marketplace images
C. formulas
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. artifacts
Correct Answer: C
Section: [none]
Explanation
Explanation/Reference:
References:
https://docs.microsoft.com/en-us/azure/lab-services/devtest-lab-comparing-vm-base-image-types
https://blogs.msdn.microsoft.com/devtestlab/2016/04/06/custom-images-or-formulas/
QUESTION 100
You develop an application. You deploy the application as a worker role to a staging environment in Microsoft Azure.
You receive feedback from testers that the application is throwing errors.
You need to ensure that you can remotely debug the application by using Server Explorer in Microsoft Visual Studio.
Correct Answer: D
Section: [none]
Explanation
QUESTION 101
You are developing an ASP.NET Core web application. The application includes a secure area only accessible to authenticated users.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Reside on the same server as the reverse proxy.
Use a reverse proxy for caching and serving static content.
Use basic authentication for the secure area.
Use the HTTPS protocol for the secure area.
Use the HTTPS protocol for all non-secure content.
Which two actions should you perform? Each correct answer presents part of the solution.
Correct Answer: AD
Section: [none]
Explanation
Explanation/Reference:
References: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/url-rewriting?view=aspnetcore-
2.1 https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.1
QUESTION 102
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
The application must be exposed to external users over ports 80 and 443 and must meet the following requirements:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Protect against denial-of-service attacks.
A. Yes
B. No
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Reference: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys?view=aspnetcore-2.1
QUESTION 103
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing an ASP.NET Core MVC web application. The landing page of the application contains over 100 small JPEG images, including many images
that have embedded text.
Mobile device users report performance issues when loading the landing page. You debug the application and determine that the number of HTTP requests is
causing the issue.
A. Yes
B. No
Correct Answer: B
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference:
QUESTION 104
You are developing a NuGet package that will be used by applications that target multiple .NET runtime environments.
You need to include NuGet package references within application project files.
A. a PackageReference node
B. the packages.config file
C. the .nupkg folder name
D. the project.json file
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
Reference: https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files
QUESTION 105
You are designing an ASP.NET Core MVC application.
A. ViewComponent
B. View
C. Controller
D. Model
Correct Answer: B
Section: [none]
Explanation
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Explanation/Reference:
Reference: https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-controller?view=aspnetcore-2.1
QUESTION 106
You are developing an ASP.NET MVC application by using Microsoft Visual Studio Professional. You plan to deploy the app to a Microsoft Azure App Services
Web App.
You must be able to edit files in the web application directly without having to redeploy or use other means of connecting to the web application.
You need to update the Web.config file to enable remote error messages.
A. Download the publishsettings file from Azure portal. Create an FTP connection to the Azure Web App and update the file.
B. Use Visual Studio to remotely debug and update the file.
C. Create a Web.config transform and deploy a debug build.
D. Use the Visual Studio Server Explorer remote view feature to update the file.
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
QUESTION 107
You are developing an ASP.NET Core web application. The web application requires sensitive configuration data.
The web application will be tested in an Acceptance Test environment. The Acceptance Test environment must be identical to the production environment.
Correct Answer: D
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Section: [none]
Explanation
Explanation/Reference:
References:
https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-2.2&tabs=windows
QUESTION 108
You develop a new ASP.NET MVC application. You use local storage to maintain state.
Which two scenarios will cause the failure? Each correct answer presents a complete solution.
Correct Answer: BC
Section: [none]
Explanation
Explanation/Reference:
References: https://www.w3schools.com/html/html5_webstorage.asp
https://html.spec.whatwg.org/multipage/webstorage.html#dom-storage-
setitem
QUESTION 109
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You develop an ASP.NET web application that is self-hosted using Open Web Interface for .NET (OWIN) in a Microsoft Azure Worker role.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to resolve the exceptions.
Solution: Change the application startup code to debug the OWIN pipeline.
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
Explanation:
We need to install the Microsoft.Owin.Diagnostics package before we change the startup code.
The Microsoft.Owin.Diagnostics package contains middleware that catches unhandled exceptions and displays an HTML page with error details.
References:
https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana#add-owin-diagnostics
QUESTION 110
A company has an enterprise library that targets the full .NET framework.
You must convert the library to target .NET Standard. You replace the original project file a .NET Standard project file. When you compile the library, the compiler
throws the following errors:
Which two actions should you perform? Each correct answer presents part of the solution. (Choose two.)
C. Add the GenerateAssemblyInfo property to the .NET Standard project file set the value to True.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
D. Delete the Properties folder and recompile the library.
Correct Answer: AB
Section: [none]
Explanation
Explanation/Reference:
QUESTION 111
You plan to deploy an ASP.NET Core MVC web application to an internal server cluster that runs Kestrel on Linux. The server cluster hosts many other web
applications. All applications are behind a Nginx load balancer.
You need to ensure that the application meets the following requirements:
Which two actions should you perform? Each correct answer presents part of the solution.
Correct Answer: AC
Section: [none]
Explanation
Explanation/Reference:
Explanation:
A: When the port number 0 is specified, Kestrel dynamically binds to an available port. When the app is run, the console window output indicates the dynamic port
where the app can be reached.
C: Because requests are forwarded by reverse proxy, we must use the Forwarded Headers Middleware from the Microsoft.AspNetCore.HttpOverrides package.
The middleware updates the Request.Scheme, using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
References: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-
2.2 https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2
QUESTION 112
You are developing an ASP.NET web application.
You need to ensure that the application can securely render user-generated content.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
Correct Answer: AD
Section: [none]
Explanation
QUESTION 113
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing a collaborative text editor. Multiple users may simultaneously edit the same document from within the application.
You need to ensure that users can see edits from all users as soon as they are made.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
Solution: Implement the application by using ASP.NET MVC. Implement the document editor as a SignaIR hub that brokers changes across client browser
instances.
A. Yes
B. No
Correct Answer: A
Section: [none]
Explanation
Explanation/Reference:
References:
https://www.dotnetcurry.com/aspnet-mvc/780/real-time-collaboration-aspnet-mvc-signalr
QUESTION 114
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing a collaborative text editor. Multiple users may simultaneously edit the same document from within the application.
You need to ensure that users can see edits from all users as soon as they are made.
Solution: Implement the application by using ASP.NET Core. Configure the editor Controller action to return JSON data. Use XML HTTP requests for
communicating editor changes.
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
QUESTION 115
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You are developing an ASP.NET MVC application that enables you to edit and save a contact.
Which two code segments can you use? Each correct answer presents a complete solution.
if(this.HttpContext.Request.RequestType == "POST")
{
SaveContact(c);
}
}
B. [HttpGet] public ActionResult
EditContact(int id)
{ var c =
RetrieveContact(id); return
View(c); }
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
[ActionName("POST")] public ActionResult
EditContact(int id, Contact c) {
SaveContact(c);
return View(c);
}
D. public ActionResult EditContact(int id,
Contact c) {
if(this.HttpContext.Request["ActionName"] ==
"GET")
{ c =
RetrieveContact(id);
}
if(this.HttpContext.Request["ActionName"] == "POST")
{
SaveContact(c);
}
}
Correct Answer: AB
Section: [none]
Explanation
Explanation/Reference:
Explanation:
A: We retrieve the GET and POST methods through this.HttpContext.Request.RequestType.
B: This is the default MVC implementation of having separate methods for GET and POST via function overloading.
Incorrect Answers:
C: incorrect use of ActionName.
D: We retrieve the GET and POST methods through this.HttpContext.Request.RequestType, not through HttpContext.Request["ActionName"].
References:
http://www.asp.net/mvc/overview/getting-started/introduction/examining-the-details-and-delete-methods
QUESTION 116
You are developing the landing page for an ASP.NET Core MVC web application that will be used to host blogs. You are implementing a View component to show
text links for common application operations.
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
You need to ensure that the links for common operations reflect the desired layout of the application when links are embedded into customized views.
Which CSS measurement unit should you use for the links?
A. vh
B. em
C. rem
D. px
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
QUESTION 117
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might
meet the stated goals. Some questions sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You are developing a collaborative text editor. Multiple users may simultaneously edit the same document from within the application.
You need to ensure that users can see edits from all users as soon as they are made.
Solution: Implement the application by using ASP.NET MVC. Configure the editor Controller action to return JSON data. Use XML HTTP requests for
communicating editor changes.
A. Yes
B. No
Correct Answer: B
Section: [none]
Explanation
Explanation/Reference:
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com
https://vceplus.com/
www.vceplus.com - Free Questions & Answers - Online Courses - Convert VCE to PDF - VCEplus.com