What should you recommend?

You are designing an ASP.NET Web application. A page of the Web application will allow
users to post comments and view comments posted by other users. You need to
recommend an approach for preventing the Web application from storing malicious content.
What should you recommend?

You are designing an ASP.NET Web application. A page of the Web application will allow
users to post comments and view comments posted by other users. You need to
recommend an approach for preventing the Web application from storing malicious content.
What should you recommend?

A.
On the page, set the ValidateRequest property of the @ Page directive to false. Use the
HtmlAttributeEncode() method on submitted content before storing the content in the
database.

B.
On the page, set the ValidateRequest property of the @ Page directive to false. Use the
HtmlEncode() method on submitted content before storing the content in the database.

C.
In the page code-behind, add a Validatelnput attribute.

D.
In the page code-behind, add a Validation attribute.

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *