Microsoft Exam Questions

You are developing an ASP.NET MVC application by using Visual Studio 2012.

You are developing an ASP.NET MVC application by using Visual Studio 2012.

The application throws and handles exceptions when it runs.

You need to examine the state of the application when exceptions are thrown.

What should you do?

A. From the Debug menu in Visual Studio 2012, select Exceptions. Enable the Thrown check box for Common Language Runtime Exceptions.

B. From the Debug menu in Visual Studio 2012, select Exceptions. Disable the User-unhandled check box for Common Language Runtime Exceptions.

C. Add the following code to the web.config file of the application.

<customErrors mode=”On” >

<error statusCode=”500″ redirect=”CustomErrors.html” />

</customErrors>

D. Add the following code to the web.config file of the application.

<customErrors mode=”On” >

<error statusCode=”404″ redirect=”CustomErrors.html” />

</customErrors>

Explanation:

Configuring the debugger to break for first chance exceptions

To change when the debugger breaks, go to Debug->Exceptions…



When you first open this window you will see that there is a tree grid with one column and checkboxes.

Reference: Understanding Exceptions while debugging with Visual Studio

http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/08/understanding-exceptions-while-debugging-with-visual-studio.aspx