3

I got this error Response object error 'ASP 0156 : 80004005'

Header Error

/ordermgmt/updateorderstatus.asp, line 1390

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.

I put Response.Buffer=true; Stilll it is showing error.

I have put reponse,Redirect @ this line number and that will be executed a number of times (it is in a loop).,After the first iteration it is showing this error

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
user29982
  • 443
  • 4
  • 9
  • 14
  • Have you checked links under 'Related' to the right of this page? Notably: http://stackoverflow.com/questions/159523/why-do-i-get-cannot-redirect-after-http-headers-have-been-sent-when-i-call-resp – Chris Serra Oct 23 '08 at 15:00

6 Answers6

3

Yes buddies, Its Fixed.Before Response.Buffer ,i included another file.Now i changed it to below the Response.Buffer=True line .Its working now .Thanks

user29982
  • 443
  • 4
  • 9
  • 14
1

Check that you're not outputting anything at all - even a blank line before your start ASP tag will cause this problem.

Zebra North
  • 11,412
  • 7
  • 37
  • 49
0

The first Response.Redirect changes the headers (and probably forces a Flush, because with a redirect, there can be no content).

The second Response.Redirect changes the headers again (probably to the same thing, but that doesn't matter, as the header were written during the Flush())

James Curran
  • 101,701
  • 37
  • 181
  • 258
0

You have to enable buffering on specific page, then you can remove this error like:

<% Response.Buffer = True %>

on top of the ASP form

Muath
  • 4,351
  • 12
  • 42
  • 69
kansal
  • 1
  • The original OP has already [answered](http://stackoverflow.com/a/230079/692942) this question why repeat what he has already said? – user692942 Apr 25 '14 at 10:42
0

The same applies if you are using Response.Flush()

cvyryk
  • 131
  • 1
  • 2
0

Set the property storage enabled = true in IIS > ASP > Storage enabled