Help on redirects on IIS5

Results 1 to 3 of 3

Thread: Help on redirects on IIS5

  1. #1
    James W. Guest

    Default Help on redirects on IIS5

    Ok, in IIS5, if you redirect after headers are written, you don&#039t get the &#039Headers already written&#039 error. This is nice but I&#039m developing for IIS4 and want to turn this off so I make sure not to cause errors.<BR>I&#039ve hunted around IIS5 manager but can&#039t find anything. Anybody know?<BR>TIA

  2. #2
    Join Date
    Dec 1969

    Default RE: Help on redirects on IIS5

    Uh, yeah, you still get that error with IIS 5. What is happeneing, I&#039d wager, is that you really aren&#039t writing any HTML comment before using your Response.Redirect **because** ASP 3.0 has the Response.Buffer value set to True by default. In your page where you think you can write HTML content before issuing a Response.Redirect simply add:<BR><BR>Response.Buffer = False<BR><BR>at the top of your ASP page and watch it blow up. :-)<BR><BR>So, to fix this, simply turn on buffering for the ASP 2.0 (IIS 4) page... just add:<BR><BR>Response.Buffer = True<BR><BR>to the top of the page...<BR><BR>HTH

  3. #3
    James W Guest

    Default RE: Help on redirects on IIS5

    I knew the error was occuring, mainly because I was writing a passed value to debug & it wasn&#039t appearing. Thanks for the tip!<BR>Is there any way to turn it off for the entire site/server?<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts