1
Reply

A .NET web application has 30 pages,which don't have try…….catch error handling code. If any error occurs in code, the application should display a common message to customer and must send an email to the particular email address. write the steps.

sathish

sathish

17y
4.7k
0
Reply

    Hi Satish,

    For your situation,

    1) Have a separate YourErrorPage.aspx page designed in such a way that displays whatever common message you want to show.

    2) In web.config file set

    Then your application is configured for Custom Error Handling.

    3) Now in the Page_Load of this page, add code to send email using "System.Web.Mail" classes.

    Even you can get the information about the error source page in the querystring in this page.

    It really works.

    Try it..