You are creating an ASP.NET application by using the .NET Framework 3.5.
The application must meet the following requirements:
* Create a tracking number to identify errors.
* Display the tracking number to the user when an error occurs.
You need to ensure that all the exceptions that contain the tracking number are logged.
You also need to ensure that the exceptions to new pages that are added to the application are also logged in the same manner.
What should you do?
A.
Log the exception in the Page_Error event of each page.Redirect to the customError.aspx page, and pass the tracking number in the query string.
B.
Log the exception in the Application_Error event of the Global.asax file.Redirect to the customError.aspx page, and pass the tracking number in the query string.
C.
In the <customError> section of the Web.config file, add the <error statusCode=”500″ redirect=”customError.aspx” /> element.
In the customError.aspx page, obtain the exception by calling the Server.GetLastError() method and display the tracking number.
D.
In the <customError> section of the Web.config file, add the <error statusCode=”500″ redirect=”customError.aspx?trackingNumber” /> element.
Log the exception in the Application_Error event of the Global.asax file.