PdfPrep.com

Which of the following settings will you add inside the system.web section of the Web.config file to accomplish the task?

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create a Web application using .NET Framework 3.5. You want to ensure that when an unhandled exception occurs on the site, a custom error page errorpage.aspx is displayed. Also, you want to ensure that when the HTTP 500 error occurs, the servererror.aspx page is displayed.

Which of the following settings will you add inside the system.web section of the Web.config file to accomplish the task?
A . <compilation debug="true">
</compilation>
B . <customErrors defaultRedirect="errorpage.aspx" mode="on"> <error statusCode="500" redirect="servererror.aspx"/>
C . <customErrors defaultRedirect="servererror.aspx" mode="on"> <error statusCode="500" redirect="errorpage.aspx"/>
D . <trace enabled="true" localOnly="false" />

Answer: B

Exit mobile version