Sphinn Home » Tips & Tools
Defining custom error pages is a convenient way to show users a friendly page when they encounter an HTTP error such as a 404 Not Found, or a 500 Server Error. Unfortunately ASP.NET handles custom error pages by responding with a 302 Temporary redirect to the error page that was defined. In this post I explain how to create a custom HttpModule that allows you to use custom error pages while preserving the original HTTP status code and avoiding the 302 redirect to the error page.
1 Comment     

Comments

from g1smd 255 days ago #
Votes: 1 | Vote:
+ -

Good post highlighting yet another flaw in a Microsoft system, but then coming up with a great solution to fix it.

HTTP status codes seem to be little understood, and badly implemented, on very many ASP sites.

Apache has a couple of gotchas, too, but usually only from an error in the syntax used in the .htaccess file... and the Apache manual already warns about those cases.


Log in to comment or register here.
Search Marketing Expo

Save the date for:
SMX East (New York City) - Oct. 6-8: See the agenda or register today and save!
SMX London - Nov. 4-5: Pre-agenda rate now available. Click here.
SMX West - Feb. 10-12

Search Marketing Now

Learn more about search marketing through free online webcasts and webinars from our sister site Search Marketing Now.

Upcoming Webcasts: