4.2.3 Question
Multiple Choice
Using custom error pages provides a lot of flexibility to an application because it allows for a consistent user experience even when the application has a problem. To take full advantage of this flexibility, you need to be able to create the pages and configure the application to use these pages. What code will provide custom error pages for 404 errors and general exceptions?
-
A. <system.web><customerrors mode="RemoteOnly" defaultredirect="Error/GeneralException"></system.web><error statuscode="404" redirect="ErrorController.Status404" /></customerrors>
-
B. <system.web><customerrors mode="RemoteOnly" defaultredirect="Error/GeneralException"></system.web><error statuscode="404" redirect="ErrorController/Status404" /></customerrors><system.webserver><httperrors errormode="Detailed" /></system.webserver>
-
C. <system.web><customerrors mode="RemoteOnly"></system.web><error statuscode="404" redirect="Error/Status404" /></customerrors>
<error statuscode="GeneralException" redirect="Error/GeneralException" /><system.webserver><httperrors errormode="Detailed" /></system.webserver> -
D. <system.web><customerrors mode="LocalOnly" defaultredirect="Error/GeneralException"></system.web><error statuscode="404" redirect="ErrorController/Status404" /></customerrors><system.webserver><httperrors errormode="Detailed" /></system.webserver>