473,320 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
2 2022

"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AlexB | last post by:
I'm trying to download a text file to an IE client using the following code. The problem is that the saved file also includes the html for the page. Any ideas anyone? Private Sub...
8
by: inamori | last post by:
I face that problems 07/01/2003 06/30/2006 ---------> it should be 3 01/01/2003 02/28/2005 --------->could i get 2 years and 2 months 01/01/2003 03/01/2005 ...
7
by: Lance Barger | last post by:
I have been developing several web applications in VB.NET. I have started to notice that when I run one of the applications, all the assemblies for that application get loaded PLUS all the...
4
by: DEWright_CA | last post by:
Hi Everyone! I am working on a project in C# and have a table the contains state info, plus a variety of other info that I will reference from another dropdown list. How can I do this...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
1
by: Anonieko | last post by:
Here are some of the approaches. 1. Transform DataGrid http://www.dotnetjohn.com/articles.aspx?articleid=36 3. Use the Export approach ...
8
by: mosscliffe | last post by:
I am an old programmer, but a newbie to Visual Web Developer 2005 - Express Edition I have an .aspx Form Page with an attached Master File and an attached css file. I have scanned a text...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.