Microsoft
70-519 · Question #263
You are designing an ASP.NET Web application that will be deployed both to a server that runs IIS 6 and to a server that runs IIS 7.0. The Web application must meet the following requirements: - Log…
The correct answer is A. Create an error handler for the Application_Error event. See the full explanation below for the reasoning.
Question
You are designing an ASP.NET Web application that will be deployed both to a server that runs IIS 6 and to a server that runs IIS 7.0. The Web application must meet the following requirements:
- Log all unhandled exceptions.
- Write exception details to a custom error log.
When an exception occurs, write the user credentials to a custom error log. You need to recommend an approach for handling errors. What should you recommend?
Options
- ACreate an error handler for the Application_Error event.
- BIn the customErrors element of the Web.config file, set the mode attribute to on.
- CIn the customErrors element of the Web.config file, set the defaultRedirect attribute to
- DCreate an error handler for the HttpApplication.LogRequest event.
How the community answered
(47 responses)- A79% (37)
- B2% (1)
- C6% (3)
- D13% (6)
Community Discussion
No community discussion yet for this question.