PRB: Doctype Parsing Behavior in Visual InterDev

Last reviewed: December 11, 1997
Article ID: Q175324
The information in this article applies to:
  • Microsoft FrontPage 97 for Windows
  • Microsoft Visual InterDev, version 1.0

SYMPTOMS

The following error occurs when browsing an Active Server Pages (ASP) file:

   Response object error 'ASP 0156'
     Header Error
     <your asp file>, line 3
     The HTTP headers are already written to the client browser. Any HTTP
     header modifications must be made before writing page content.

CAUSE

The following conditions cause the error to occur:

  • The ASP file contains a WebBot from FrontPage 97.
  • The ASP file contains a 'response.expires' or 'response.buffer'.

Every time the file is saved in Visual InterDev the FrontPage Server Extensions parse the file and add the following line to the top of the file (the local copy does not change, so you have to get working copy to see the changes):

   "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">"

With the above line added to the file, the response properties mentioned above are now set after the HTTP header has been written to the client browser.

RESOLUTION

Remove the WebBot.

-or-

Edit the ASP file in NotePad and remove the [ASCII 147]DOCTYPE[ASCII 148] line.

-or-

Don't use [ASCII 147]response.expires[ASCII 148] or [ASCII 147]Response.buffer[ASCII 148]

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new .htm file in a Visual InterDev project.

  2. Open the .htm file in Microsoft FrontPage97 (Visual InterDev edition).

  3. Add the Timestamp bot to the .htm file. Save and close.

  4. Rename the .htm file extension to .asp and open the .asp file in the default editor.

  5. Add the following code to the third line (after <%@ LANGUAGE...) in the

        file <%response.expires=0%>. Save and preview the file.
    

The error described above appears.

Get a working copy of the file and select Use Master Copy when prompted.

The first line of the file now contains the <doctype...> instead of <%@ language =...>

REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/vinterdev/

Keywords          : VIASP VIFPSE kberrmsg
Technology        : kbInetDev
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.