InstantASP Support

Help & Support

Enabling custom error pages within InstantForum or InstantKB

Common Questios

This article explains how to enable ASP.NET custom errors pages within InstantForum. This is helpful if you wish to display your own custom error page should the application encounter a 404 Page Not Found error or 500 Internal Server errors.

It's generally best practice to enable customErrors within any production ASP.NET web application. This can help secure your installation by ensuring sensitive debug information is not rendered to the screen.

To enable customErrors we'll need to modify the web.config file found within the root of your InstantForum installation. Open the web.config file within NotePad and follow the steps below...

1. Change...

<add type="InstantASP.Common.HttpModule.ExceptionModule, InstantASP.Common" name="ExceptionModule" />


<add type="InstantASP.Common.HttpModule.ExceptionModule, InstantASP.Common" name="ExceptionModule" />

2. Change

<add name="ExceptionModule" type="InstantASP.Common.HttpModule.ExceptionModule"/>

<add name="ExceptionModule" type="InstantASP.Common.HttpModule.ExceptionModule"/>

Basically you are removing our custom exception handler as this overrides the error handling functionality.

3. Within your web.config ensure you handle custom errors..

Classic App Pool

<customErrors mode="RemoteOnly" defaultRedirect="">
<error statusCode="404" redirect=""/>
<error statusCode="500" redirect=""/>

Integrated App Pool

<httpErrors defaultResponseMode="Redirect" errorMode="DetailedLocalOnly">
<error statusCode="404" prefixLanguageFilePath="" path="" responseMode="Redirect" />
<error statusCode="500" prefixLanguageFilePath="" path="" responseMode="Redirect" />

That's It!

If we can assist with any further questions of course please don't hesitate comment below or contact us.

Related Links

Optionally provide private feedback to help us improve this article...

Thank you for your feedback!

Comments require login or registration.


Product: InstantKB, InstantForum
Version: All Versions
Level: Novice
Article not rated yet.
Article has been viewed 11K times.
Last Modified: 5 Years Ago
Last Modified By: Ryan Healey


Similar Articles