Power BI

Content by Charles Sterling

Custom Errors being ignored in ASP.net


In playing with custom errors i found even though i set the <customerrors> and debug section in my web.config like those below

<compilation debug="false"/>

<customErrors defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm"/>
        <error statusCode="404" redirect="~/myerror.htm"/>

I found these settings were still getting ignored until i set the retail flag in the Machine.config.

    <deployment retail="true"/>


…now i don’t know if this is a change with the .NET framework in Windows Server 2008 -or i had forgotten i had done this in the past but it is working this way now.