Which of the following code segments will you add to the Web.config file to accomplish this task?

Posted by: Pdfprep Category: GSSP-.NET Tags: , ,

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET

2008 as its application development platform. You create an ASP.NET Web application using the .NET Framework 3.5. The application contains two HTML pages named Error.htm and

PageNotFound.htm. You want to make sure that the following requirements are met:

l When any user requests a page that does not exist, the PageNotFound.htm page is displayed.

l When any other error occurs, the Error.htm page is displayed.

Which of the following code segments will you add to the Web.config file to accomplish this task?
A . <customErrors mode="On" defaultRedirect="Error.htm"> <error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
B . <customErrors mode="Off">
<error statusCode="400" redirect="Error.htm"/>
<error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
C . <customErrors mode="On">
<error statusCode="400" redirect="Error.htm"/>
<error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
D . <customErrors mode="Off" defaultRedirect="Error.htm"> <error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>

Answer: A

Leave a Reply

Your email address will not be published.