
EC-CouncilCertified Application Security Engineer (.NET)
Domain 3Objective 3
Input Validation for ASP.NET Core CASENET Practice Questions (Page 9)
Part of the Secure Coding: Input Validation domain, which makes up ~11% of our current practice bank. EC-Council does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–9 in this domain), expect 2–2 from this objective — we provide 46 practice questions to prepare you well beyond it. (estimate)
46questions here
10free pages
11concepts
Questions 41–45
- 41
Which class provides static methods to validate an object outside of the model-binding pipeline?
Select an answer first - 42
An ASP.NET Core Web API controller is decorated with [ApiController]. When a POST request contains invalid model data, the API automatically returns a 400 response. The team wants to ensure the response body follows the ProblemDetails format and includes validation errors. What should they do?
Select an answer first - 43
An ASP.NET Core MVC application has a form that accepts a `Url` property. The team wants to prevent stored XSS by validating that the URL is well-formed and only allows HTTP/HTTPS schemes. They also want to ensure that the URL is not used in an unsafe way in views. Which combination of measures is most appropriate?
Select an answer first - 44
A team is building a batch import feature in an ASP.NET Core application. The import file contains rows that are mapped to objects with data annotations. The team wants to validate each object and collect all validation errors for reporting, but they do not want to stop at the first error. They also need to ensure that the validation does not rely on the HTTP pipeline. Which approach should they use?
Select an answer first - 45
A developer is creating a custom validation attribute that needs to access the value of another property on the same model. The attribute is applied to the Email property and must check that the Email does not match the UserName property. The developer has overridden IsValid(ValidationContext context). What should the developer do to access the UserName property?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by EC-Council. “CASENET” is a trademark of its owner, used for identification only.