Microsoft
70-519 · Question #103
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 D. 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 HttpApplication.LogRequest event.
- BIn the customErrors element of the Web.config file, set the defaultRedirect attribute to
- CIn the customErrors element of the Web.config file, set the mode attribute to On.
- DCreate an error handler for the Application_Error event.
How the community answered
(30 responses)- A13% (4)
- B7% (2)
- C3% (1)
- D77% (23)
Community Discussion
No community discussion yet for this question.