catch exception in the webform application

New Contributor



I am using try catch exception to display exception error message to the user by calling the java script alert from code behind. When the webform is being deployed to the 2016 windows server, it is working as per expected. But when the same webform application is deployed to the 2019 windows server, a system page(yellow screen of death) with description, exception details, source error and stack trace will be displayed. If anything need to be configured in the iis 2019 such that webform will able to catch the exception? Another thing to add on is for 2019 server it is using https protocol and in 2016 it is using http.




1 Reply

Hi @KennethIfx,

Thanks for posting your issue here.

However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang