If I set customErrors to this, then my error page works. I wonder why httpErrors does not work. This is probably an ASP.NET question and not a Kentico-specific question, except that Kentico's documentation says httpErrors
should work for IIS7+.
<customErrors defaultRedirect="~/ErrorPage.aspx?" mode="On" />