Hi guys, have a strange issue where our CustomExceptionHandler works fine and displays custom error pages on our development environment, but not on the production/live environment; pretty much used the example project for customeventhandlers
public class CustomExceptionHandler : AbstractExceptionHandler
{
/// <summary>
/// Fires when exception occurs. Performs the additional actions after exception occurs.
/// </summary>
/// <param name="e">Thrown exception</param>
public override void OnException(Exception e)
{
string sErrorPage = Util.GetConfigSetting("App.ErrorRedirectPage");
HttpContext.Current.Response.Redirect(sErrorPage);
}
}
And in both config files, we have:
<add key="CMSUseCustomHandlers" value="true"/>
<add key="CMSCustomHandlersAssembly" value="RGPN.CustomEventHandler"/>
<add key="App.ErrorRedirectPage" value="~/ErrorPage.aspx" />
And the RGPN.CustomEventHandler dll is in the bin directory.
So in development, we get redirected to the ErrorPage.aspx page on the root level of site and it all works fine, but in live it displays the standard ASP.NET error page and doesnt seem to be affected by changing the customerrors in the web.config (on or off doesnt do anything)
Is there anything I am missing or I should check for?