Header Error Response object error 'ASP 0159: 80004005' Header Error. The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content. |
The short answer is to execute any response.redirect calls before any client-side code, including the opening <html> tag. The long answer is to use response.buffer = true first, which can allow you to display content before redirecting...
Object Moved When using Response.redirect with certain browsers, you can get the Object Moved error message. One way to prevent this from happening is using response.clear first (note that buffering must be enabled):
<% Response.Expires = 0 Response.Buffer = true ' ... Response.Clear Response.Redirect "http://www.domain.com" %> |
This is an undocumented 'feature' of IIS 4.0 (but fully documented in IIS 5.0).
Thanks to Michel Thiffault for submitting this information.