404 Custom error pages not working for .aspx extensions

The 404 Custom error pages that you have setup in Helm, will not work for any .NET extensions ie: .aspx, asmx etc.

This is because .NET is handling the error page response and not IIS as for other file extensions.

You will need to setup your web.config to handle the needed error codes.


Using you own custom error page in you Asp.NET website is easy.
Place the following web.config file in the website root.

<error statusCode="404" redirect="/ErrorPage/404.aspx" />

status code is the error code you would like to catch.

<configuration>
      <system.web>

            <customErrors mode="On" defaultRedirect="/ErrorPage/404.aspx">
                     <error statusCode="404" redirect="/ErrorPage/404.aspx" />
            </customErrors>

      </system.web>

</configuration>

Add Feedback