By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

HOWTO Override ASP's Response output for 2003/IIS.

P: n/a
ATS
HOWTO Override ASP's Response output for 2003/IIS.

Please help,

I want to have an ASP page write back EVERYTHING to the ASP Response. That
includes HTTP Headers. I want my ASP to look something like this:

==========================================
<%@ Language=VBScript %>
<%
Set objBinaryGen = Server.CreateObject("MyComponents.BinaryGenerator" )
vntPicture = objBinaryGen.MakePicture
Response.BinaryWrite vntPicture
%>
==========================================

I got this from the MSDN documentation for BinaryWrite, but the problem is
that the HTTP Headers are still sent before the buffer that the Response
object manages is populated from the BinaryWrite.

Is there a way we can 100% STOP the ASP from sending ANY HTTP headers back
and instead let something like the BinaryWrite send all the data back?

Jul 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"ATS" <AT*@discussions.microsoft.comwrote in message
news:61**********************************@microsof t.com...
HOWTO Override ASP's Response output for 2003/IIS.

Please help,

I want to have an ASP page write back EVERYTHING to the ASP Response. That
includes HTTP Headers. I want my ASP to look something like this:

==========================================
<%@ Language=VBScript %>
<%
Set objBinaryGen = Server.CreateObject("MyComponents.BinaryGenerator" )
vntPicture = objBinaryGen.MakePicture
Response.BinaryWrite vntPicture
%>
==========================================

I got this from the MSDN documentation for BinaryWrite, but the problem is
that the HTTP Headers are still sent before the buffer that the Response
object manages is populated from the BinaryWrite.

Is there a way we can 100% STOP the ASP from sending ANY HTTP headers back
and instead let something like the BinaryWrite send all the data back?
If there were it wouldn't be HTTP any more. The protocol has a series of
headers followed by an entity body. If you're receiving the response with a
home grown TCP/IP app then just discard all the headers until you're read
the sequence CrLfCrLf then you'll be at the first byte of your binary
output.


Jul 15 '06 #2

P: n/a

"ATS" <AT*@discussions.microsoft.comwrote in message
news:61**********************************@microsof t.com...
HOWTO Override ASP's Response output for 2003/IIS.

Please help,

I want to have an ASP page write back EVERYTHING to the ASP Response. That
includes HTTP Headers. I want my ASP to look something like this:

==========================================
<%@ Language=VBScript %>
<%
Set objBinaryGen = Server.CreateObject("MyComponents.BinaryGenerator" )
vntPicture = objBinaryGen.MakePicture
Response.BinaryWrite vntPicture
%>
==========================================

I got this from the MSDN documentation for BinaryWrite, but the problem is
that the HTTP Headers are still sent before the buffer that the Response
object manages is populated from the BinaryWrite.

Is there a way we can 100% STOP the ASP from sending ANY HTTP headers back
and instead let something like the BinaryWrite send all the data back?
Just FYI. Even images that are fetched through the GET method might return
headers based on the HTTP clients request. So if the HTTP client uses
If-Modified-Since or ETAg metatag, IIS responds (if possible) with a unique
value, that identifies the version of the image or it responses "302 Not
Modified..."

The way you are at, is writing an IISAPI filter, that intercepts certain
requests and responds with a plain binary answer. I'm sure you don't want to
travel that road, since ISAPI is only for crazy madmen :)

Jul 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.