Which code segment should you use?

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.
Which code segment should you use?



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.
Which code segment should you use?



A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 7

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


Dave

Dave

I think it should be ‘D’

Tantra

Tantra

answer should be D, as you have to let user save HTML while keeping security intact.

neha

neha

D is the correct answer.
The ValidateInput attribute will be false for the SavePosting() action.

Vio

Vio

“You need to enable users to edit and save their HTML” – why don’t decorate the controller with ValitateInput instead of method?

sac

sac

I agree with D.
Only the method is affected: “maintaining existing security protection measures”
So changing the validation on the whole controller would be too much.

Martin K

Martin K

Hi All, I have just passed my 346 but only 11 questions from this questionnaire came into the test, my advise is for everyone to use it with additional recent materials. Testking if you can update the material that will be soo much better.
Thanks