Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
EC-Council logo

EC-CouncilCertified Application Security Engineer (.NET)

Domain 7Objective 1

Secure Exception Handling CASENET Practice Questions (Page 2)

Part of the Secure Coding: Error Handling and Logging domain, which makes up ~12% of our current practice bank. EC-Council does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–10 in this domain), expect 2–3 from this objective — we provide 45 practice questions to prepare you well beyond it. (estimate)

45questions here
9free pages
8concepts

Questions 6–10

  1. 6expert · hard

    A developer is refactoring a legacy .NET method that performs multiple operations: reading a file, parsing data, and updating a database. The current code has a single try-catch that catches Exception and returns a generic error. The team wants to improve error handling so that file-related errors are logged with the file path, database errors are logged with the SQL command, and all other errors are logged generically, without exposing any of these details to the user. What is the best structure?

    Select an answer first
  2. 7foundation · easy

    In .NET, which block is used to ensure that resources are cleaned up regardless of whether an exception is thrown?

    Select an answer first
  3. 8application · medium

    You are implementing a centralized exception logging mechanism for a .NET application. The logging must capture the exception type, stack trace, and the user's ID, but must not capture the user's session token or any form data. Which approach best meets these requirements?

    Select an answer first
  4. 9foundation · easy

    During a code review of exception handling, what should a reviewer look for?

    Select an answer first
  5. 10application · medium

    A team has implemented a centralized exception handler that logs exceptions and returns a generic JSON error response. They want to test that the handler does not leak sensitive data and that it logs all unhandled exceptions. Which testing strategy is most effective?

    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.