[Custom
Errors]
Also default error pages look very ugly and outdated design, which may harm your brand.
So It's always recommended to use custom error pages..
So, How Could I display a custom error page in DNN when error occurs ?
To Disable DNN Error Handling, and Let Errors Bubble..
Host Settings >> Appearance >> Un-Check "Use Custom
Error Messages? "
To Redirect Users To, Can be aspx page, but I prefer HTML
Then Create HTML Page at the root with Style
Then in Enable CustomErrors in Web.Config :
<customErrors mode="On">
<error statusCode="500"
redirect="/MyCustomError.html"/>
<error statusCode="404"
redirect="/MyCustomError.html"/>
<error statusCode="403"
redirect="/MyCustomError.html"/>
</customErrors>
<httpErrors>
<remove statusCode="404" subStatusCode="-1"/>
<error statusCode="404" prefixLanguageFilePath="" path="/MyCustomError.aspx" responseMode="ExecuteURL"/>
<remove statusCode="403" subStatusCode="-1"/>
<error statusCode="403" prefixLanguageFilePath="" path="/MyCustomError.html" responseMode="ExecuteURL"/>
</httpErrors>