Click to See Complete Forum and Search --> : Content Stream Issue after ISP switch


GDawgGWC
06-12-2006, 12:13 PM
Our company switched from DSL to T1 last week, and I ran into a problem with a page on our site. On my computer, and two others that I've found, everything continues to work fine. On the rest of the computers, however, the page opens and displays nothing. The code looks like this:


<!-- #INCLUDE VIRTUAL="/Pages/secure.asp" -->
<%
Dim objStream,strFilePath
Response.Clear
strFilePath=server.MapPath(Request.Form("pdf"))
Set objStream=Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type=1
objStream.LoadFromFile strFilePath
Response.ContentType="application/pdf"
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream=Nothing
Response.End
Response.Status="404 Not Found"
%>
<html>
<head>
<title>HSCGI.biz PDF Viewer</title>
</head>
<body style="font-size:30pt">
No Admittance!
</body>
</html>


It seems that the stream is opening, but nothing is being displayed. Oh, another oddity, the page displays fine everywhere with Firefox as far as I can tell. Is there a setting in internet explorer I'm missing or something like that? Any help would be greatly appreciated!

Thanks in advance,
-Greg

GDawgGWC
06-14-2006, 02:41 PM
Who knows why, but apparently some of the computers were just fine with the location of the line

Response.ContentType="application/pdf"

While others wanted that first. Moving that to the top of the code solved the problem and the PDFs display fine everywhere now.