Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

IIS error page from HttpModule?

Is it possible to redirect to an IIS 401 or 403 error page by setting the Response.StatusCode in an HttpModule?

Right now, my code look like:
          e.Context.Response.StatusCode = 401;
          e.Context.Response.End();

This passes back the proper headers, but fails to produce an error page on the client side.  Is it to late for IIS to respond with an error page, or do we have to hook it up ourselves?

Greg Hurlman
Thursday, October 28, 2004

Yes, it's too late. You'll have to provide the content yourself.

Brad Wilson
Wednesday, November 03, 2004

*  Recent Topics

*  Fog Creek Home