You can't actually fire an error by just setting the Response.Status of the request. These error mappers work through ASP.NET's error handlers which occur prior to code ever reaching your page logic (well at least in the case of 400 style errors).
Michel's point is right on - you need to throw an exception to make this happen explicitly, but then you could probably just redirect directly to this page.
+++ Rick ---
>Hello Team, I am obviously doing something wrong ... Why do I get the default IIS error pages given the following code:
>
>
Context.Response.Clear();
>Context.Response.StatusCode = 403;
>Context.Response.End();
>
>and a web.config that has:
>
><customErrors mode="On" defaultRedirect="defaultError.htm">
> <error statusCode="404" redirect="~/NotFound.aspx" />
> <error statusCode="403" redirect="~/NoAccess.aspx" />
></customErrors>
>
>My thanks in advance,