What should you recommend?

Correct Answer for the following Question is given below

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?Using Application_ErrorWhen both MVC applications and traditional ASP.NET applications encounter an exceptio that is not handled at the page level, they call the Application_Error method in the Global. asax file. Application_Error is the perfect place for logging information about errors that occur within a production web application so that you can troubleshoot them later.

Question:

What should you recommend?

Options:

Create an error handler for the Application_Error event.

Create an error handler for the HttpApplication.LogRequest event.

In the customErrors element of the Web.config file, set the mode attribute to On.

In the customErrors element of the Web.config file, set the defaultRedirect attribute to errors.htm.

Correct Answer

The Correct Answer for this Question is

Create an error handler for the Application_Error event.

Explanation

The Question – What should you recommend? has been answered correctly and answers for the question is Create an error handler for the Application_Error event.

More about these Exams

These Exam Questions and the order of these questions keep changing. but the answers are obviously same. so if you don’t find a question after another we suggest you search it in the search box and we are sure you’ll find it. you can bookmark this site for Quick access in future.

We hope you found it helpful don’t forget to leave a comment if you feel a need to correct or ask we’re always here to help.

you can find more here at mnccertified

Feel free to contact via comment or email.

Happy Learning

Cheers, Team MNCcertified

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *