In my asp.net web site I have custom error pages defined as following in my web.config file.
The solution was even simpler.. Please check out my response over here: http://blog.hebbink.com/post/2010/12/14/NET-custom-404-error-page-returns-302-for-http-status.aspx