New Year Sale ! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft Exam 70-486 Topic 3 Question 5 Discussion

Actual exam question for Microsoft's 70-486 exam
Question #: 5
Topic #: 3
[All 70-486 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: C

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


Contribute your Thoughts:

Currently there are no comments in this discussion, be the first to comment!


Save Cancel