ASP classic on IIS7.5 issue causes the response header to appear in the body

zoran

New Member
I have recently moved a classic ASP web application from IIS 6 to IIS 7.5 on Windows 2008 R2. This site has run great on IIS 6 for 4+ years. For the most part, the site works well on IIS 7.5, however, on occasion when you load a page something is happening where the response is not processed by the browser properly. As a result the actual response header is returned in the body of the response, either before the \[code\]<html>\[/code\] tag or after the \[code\]</html>\[/code\] tag. When the response is at the top before the \[code\]<html>\[/code\] tag it is seen by the end user in the browser.Sample response where the header is above the \[code\]<html>\[/code\] tag:\[code\]HTTP/1.1 200 OKCache-Control: privateContent-Length: 9714Content-Type: text/htmlServer: Microsoft-IIS/7.5P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"Set-Cookie: CSB=UserType=3&Client=805157&FNAME=John+Doe&CAMS=False&Client%5FUser%5FMode=Online&Session=650680780&User=1&LastViewed=https%3A%2F%2Fsite%2Edomain%2Ecom%2Fcsb%2Fclient%2Fdefault%2Easp%3FClient%3D123456%26PBAT%3D654321%26BAT%3D654321&Username=jjd; path=/X-Powered-By: ASP.NET<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> <title>some page</title> <script>...</script> </head> <body> </body></html>\[/code\]The content of the response header is literally rendered on the screen in the browser. This issue does not happen on every request. I've successfully reproduced the issue in IE and Chrome, but it's random so I have struggled being able to track down the root cause.Sometimes the header is printed below the \[code\]</html>\[/code\] tag and doesn't get rendered in the browser.There are no errors thrown by IIS or ASP. I found this and I tried using the tracing failed request module in IIS and it didn't help because the request doesn't actually fail so there is nothing to trace.I've tried watching the traffic in Fiddler, but all i get is the warning that the size of the response is larger than the header declares, which is because the actual response header text is being returned with the response body.The server is running Windows Firewall and eset antivirus - but both were running on the old IIS 6 box as well.In terms of configuring IIS, I've done all the basics that people recommend for running classic ASP.I'm not a beginner when it comes to IIS configuration, but this is the only ASP site I really work with anymore and all I'm trying to do is to get it to run properly on the new setup.I'm stuck, is there anyone out there that's seen this before?
 
Back
Top