Display exception error messages

While working with MVC widgets, you might encounter exceptions or errors. In such cases, Sitefinity CMS checks whether an error message with relevant information needs to be displayed. This depends on how you have configured your project in the web.config file, specifically in the <customErrors> section.

Following is a list with error scenarios and the respective error configurations:

XML
<!-- An error message is displayed for all failing controllers: -->

<system.web>
 <customErrors mode="Off"></customErrors>
</system.web>

<!-- No error message is displayed in case an exception occurs: -->

<system.web>
 <customErrors mode="On"></customErrors>
</system.web>

<!-- No error message is displayed to remote clients. An error message is displayed only to local clients: -->

<system.web>
 <customErrors mode="RemoteOnly"></customErrors>
</system.web> 
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
New to Sitefinity?