How can I configure ASP.NET/IIS to show custom error pages (i.e. a nice friendly error page), but to still return a 404/500 status code so that google does not try to index the page?
I have tried setting the Response.StatusCode to 404, but then the nice error page does not show anymore.