Microsoft 70-486 Exam Practice Questions (P. 4)
- Full Access (234 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #16
DRAG DROP -
You are developing an ASP.NET MVC application in Visual Studio. The application contains sensitive bank account data.
The application contains a helper class named CustomEncryptor.

The application contains a controller named BankAccountController with two actions.

The application contains a model named BankAccount, which is defined in the following code segment.

The application must not display AccountNumber in clear text in any URL.
You need to build the view for the GetAccounts action.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to build the view? To answer, drag the appropriate code segment to the correct targets. 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.
Select and Place:

You are developing an ASP.NET MVC application in Visual Studio. The application contains sensitive bank account data.
The application contains a helper class named CustomEncryptor.

The application contains a controller named BankAccountController with two actions.

The application contains a model named BankAccount, which is defined in the following code segment.

The application must not display AccountNumber in clear text in any URL.
You need to build the view for the GetAccounts action.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to build the view? To answer, drag the appropriate code segment to the correct targets. 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.
Select and Place:

send
light_mode
delete
Question #17
You are developing an ASP.NET MVC application.
The application must allow users to enter JavaScript in a feedback text box only.
You need to disable request validation.
What should you do?
The application must allow users to enter JavaScript in a feedback text box only.
You need to disable request validation.
What should you do?
- AApply and set the CausesClientSideValidation attribute on the text box to FALSE.
- BApply and set the ValidateInput attributeon the text box to FALSE.
- CUse the HttpRequest.Unvalidated property to read the unvalidated form value.
- DUse the HttpRequest.Form property to read the unvalidated form value.
Correct Answer:
C
The HttpRequest.Unvalidated property gets the HTTPrequest 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
C
The HttpRequest.Unvalidated property gets the HTTPrequest 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
send
light_mode
delete
Question #18
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.
Which command-line tool should you use?
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.
Which command-line tool should you use?
- AAspnet_regiis.exe
- BNgen.exe
- CAspnet_merge.exe
- DEdmGen.exe
Correct Answer:
A
References:
http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx
A
References:
http://msdn.microsoft.com/en-us/library/zhhddkxy(v=vs.100).aspx
send
light_mode
delete
Question #19
HOTSPOT -
You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication.
The application must:
✑ Use Windows Identity Foundation 4.5.
✑ Support the Windows Azure Access Control Service.
You need to implement authentication.
How should you build the class constructor? (To answer, select the appropriate option from the drop-down list in the answer area.)
Hot Area:

You are developing an ASP.NET MVC application that authenticates a user by using claims-based authentication.
The application must:
✑ Use Windows Identity Foundation 4.5.
✑ Support the Windows Azure Access Control Service.
You need to implement authentication.
How should you build the class constructor? (To answer, select the appropriate option from the drop-down list in the answer area.)
Hot Area:

Correct Answer:
Example: public class MyIdentityClaim
{
private string _identityProvider;
private string _identityValue ;
public const string ACSProviderClaim = "http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider"; public MyIdentityClaim(IClaimsIdentity identity)
{
if (identity != null)
{
foreach (var claim in identity.Claims)
{
if (claim.ClaimType == ClaimTypes.NameIdentifier)
{
_identityValue = claim.Value;
}
if (claim.ClaimType == ACSProviderClaim)
{
_identityProvider = claim.Value;
}
}
}
}
Reference: Azure Acs plus asp.net MVC memberships
https://garvincasimir.wordpress.com/2011/08/06/azure-acs-plus-asp-net-mvc-memberships/

Example: public class MyIdentityClaim
{
private string _identityProvider;
private string _identityValue ;
public const string ACSProviderClaim = "http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider"; public MyIdentityClaim(IClaimsIdentity identity)
{
if (identity != null)
{
foreach (var claim in identity.Claims)
{
if (claim.ClaimType == ClaimTypes.NameIdentifier)
{
_identityValue = claim.Value;
}
if (claim.ClaimType == ACSProviderClaim)
{
_identityProvider = claim.Value;
}
}
}
}
Reference: Azure Acs plus asp.net MVC memberships
https://garvincasimir.wordpress.com/2011/08/06/azure-acs-plus-asp-net-mvc-memberships/
send
light_mode
delete
Question #20
HOTSPOT -
You are developing an ASP.NET MVC application.
You need to store membership information in a Microsoft SQL Server database.
How should you configure the membership provider? (To answer, select the appropriate options in the answer area.)
Hot Area:

You are developing an ASP.NET MVC application.
You need to store membership information in a Microsoft SQL Server database.
How should you configure the membership provider? (To answer, select the appropriate options in the answer area.)
Hot Area:

Correct Answer:
References:
http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx

References:
http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider.aspx
send
light_mode
delete
All Pages