/VirtualDirectory/ASPPage.asp, line XX
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
Note This also occurs if you upgraded a computer that is running Microsoft Windows NT 4.0 to Microsoft Windows Server 2003.
An example of this is when an ASP page is processed that contains HTML tags or any other server-side scripts before a Response.Redirect statement.
The following properties and methods of the Response object of ASP write HTTP headers:
For example, to avoid this error with redirection, buffer or withhold the ASP page during its processing and issue the redirection after processing. There are two ways to accomplish buffering: on an application level or on a page level.
Note Ensure that the redirection is issued after all ASP scripts. If it is issued prior to ASP scripts, the ASP page redirects without processing the ASP code.
On an application level, all ASP pages within the Web application will be buffered when they are processed. To set buffering on an application level, follow these steps:
- In the Microsoft Management Console (MMC), locate the Web site where your Web application resides.
- Click to expand the Web site to display the virtual directories and Web applications.
- Right-click the Web application, and then click Properties.
- On the Virtual Directory tab, click Configuration.
Note If the Configuration button is unavailable, the virtual directory is not a Web application. Click Create to create the virtual directory to a Web application.
- In the Application Configuration dialog box, on the App Options tab, click Enable buffering.
<% @LANGUAGE = "VBScript" %>
<% Response.Buffer = True %>
Other ASP/Clientside scripts or HTML ...
<% Response.Redirect %>
Article ID: 229657 - Last Review: Aug 14, 2008 - Revision: 1