ASP page hint Response object error ASP 0156:80004005 HTTP Header Error _ Application Tips

Source: Internet
Author: User
In fact, this kind of problem is due to the caching problem, you can refer to the following method to solve:

Some ASP pages will appear the first time the Response object error ' asp 0156:80004005 ' HTTP header error, but refreshed again normal, the solution is as follows
Copy Code code as follows:

Response.Buffer = True
' should be this line, get rid of OK

' If it's not enough, put
Response.Buffer = True
Response.ExpiresAbsolute = Now ()-1
Response.Expires = 0
Response.CacheControl = "No-cache"
Response.AddHeader "Pragma", "No-cache"
' All removed, this is not cached page use, remove should not affect the site


This error occurs because the WEB server uses an HTTP header to set up the client browser. The WEB server then attempts to reset the client brower by using a different HTTP header (for example, when an HTTP header is set to the browser content-type and then redirected) = text/html. An example is the process of processing an ASP page before it contains an HTML tag or any other server-side script Response.Redirect statement.

Note This can also occur if you are upgrading to Microsoft Windows Server 2003 running Microsoft Windows NT 4.0 computers.

An example is the process of processing an ASP page before it contains an HTML tag or any other server-side script Response.Redirect statement.

The following properties and methods of the ASP for the Response object are written to the HTTP headers:
Response.AddHeader
Response.CacheControl
Response.Charset
Response.ContentType
Response.Expires
Response.ExpiresAbsolute
Response.Redirect
Response.Status
Back to the top

Solution
To resolve this issue, send the HTML output to set the HTTP title, such as the Redirect statement or cookie information.

For example, to avoid this error and redirection, the buffer or ASP page restricts its processing and then processes the redirection after it is issued. There are two ways to accomplish buffering: page-level or application-level.

Note Ensure redirection, all ASP scripts are issued after. If the ASP script is previously issued, it emits ASP page redirection without processing the ASP code.

At an application level when they are processed, all ASP pages in the WEB application are buffered. To set an application level, on the buffer, follow these steps: 1. In Microsoft Management Console (MMC), locate the Web site hosting Web application.
2. Click to expand the Web site to display virtual directories and WEB applications.
3. Right-click the Web application, and then clicking Properties.
4. On the Virtual Directory tab, click Configure.

Note If the configuration button is unavailable, the virtual directory is not a WEB application. Click to create a virtual directory to WEB application creation.
5. In the applicationconfiguration@@ 对话 box, on the App Options tab, click Enable Buffering.
To set the page level, add code to the @LANGUAGE line on the ASP page as follows:
<% @LANGUAGE = "VBScript"%><% response.buffer = True%>other asp/clientside scripts or HTML ... <% Response . Redirect%> as shown in the following code in addition, can be used for cookies to set the page level, buffering. This snippet is written before the Cookie in the Send <HTML> tag (element).
Response.Cookies ("Name") =value
If you're using a little whirlwind, you're missing components.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.