Your Web application includes a page named ErrorPage.aspx. To manage unhandled application exceptions, ErrorPage.aspx should be shown and exception data should be written to the event log. Your web.config file includes the following code: Next, you should consider _______.
1.Adding this code to the Default.asax file: void Application_Error(object sender, EventArgs e){Exception exc = Server.GetLastError();//Write Exception details to event log}
2.Adding this code to the Global.asax file: void Application_Error(object sender, EventArgs e){Exception exc = Server.GetLastError();//Write Exception details to event log}
3.Adding this code to the ErrorPage.aspx file: void Page_Error(object sender, EventArgs e){Exception exc = Server.GetLastError();//Write Exception details to event log Server.ClearError();}
4.Adding this code to the master page: void Application_Error(object sender, EventArgs e){Exception exc = Server.GetLastError();//Write Exception details to event log}
Posted Date:-2022-08-15 11:13:06