Open the Global.asax fi le and wrap the entire code in Application_Error in an If check
that ensures that SendMailOnError is set to True. Additionally, change the hard-coded e-mail
addresses to use the FromAddress and ToAddress from the AppConfiguration class instead: