
EC-CouncilCertified Application Security Engineer (.NET)
Domain 3Objective 3
Input Validation for ASP.NET Core CASENET Practice Questions (Page 7)
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 31–35
- 31
A development team is building an ASP.NET Core MVC registration form for a financial application. The form collects a username, email, and account balance. The team must ensure that the username is required and between 3 and 20 characters, the email is a valid email format, and the account balance is non-negative. They also need to prevent overposting attacks. Which approach should they use?
Select an answer first - 32
In an ASP.NET Core API controller decorated with [ApiController], what happens automatically when model validation fails?
Select an answer first - 33
In an ASP.NET Core MVC application, a booking form has `StartDate` and `EndDate` properties. The business rule requires that `EndDate` must be later than `StartDate`. The team wants to enforce this rule during model binding so that ModelState.IsValid becomes false when the rule is violated. Which approach should they take?
Select an answer first - 34
An ASP.NET Core MVC application has a model with `StartDate`, `EndDate`, and `MaxDurationDays`. The team needs to enforce two rules: EndDate must be after StartDate, and the duration must not exceed MaxDurationDays. They also need to ensure that validation errors are associated with the EndDate field so they display next to it. Which approach should they use?
Select an answer first - 35
An ASP.NET Core Web API controller is decorated with [ApiController]. The team wants to customize the validation error response to include a custom error code and a correlation ID, while still using the ProblemDetails format. What is the most appropriate way to achieve this?
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.