473,748 Members | 3,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=VBScri pt %>
<%
Set objBinaryGen = Server.CreateOb ject("MyCompone nts.BinaryGener ator")
vntPicture = objBinaryGen.Ma kePicture
Response.Binary Write 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 2048

"ATS" <AT*@discussion s.microsoft.com wrote in message
news:61******** *************** ***********@mic rosoft.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=VBScri pt %>
<%
Set objBinaryGen = Server.CreateOb ject("MyCompone nts.BinaryGener ator")
vntPicture = objBinaryGen.Ma kePicture
Response.Binary Write 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*@discussion s.microsoft.com wrote in message
news:61******** *************** ***********@mic rosoft.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=VBScri pt %>
<%
Set objBinaryGen = Server.CreateOb ject("MyCompone nts.BinaryGener ator")
vntPicture = objBinaryGen.Ma kePicture
Response.Binary Write 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
5628
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 Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
8
5929
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 --------->could i get 2 years and 2 months and 1
7
2746
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 assemblies for the other applications. I do not like this behavior and want only the required assemblies to get loaded. Any suggestions and overall information would be greatly appreciated.
4
1265
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 programatically? What I am doing is this, 1. create dbconn, to tblStates (already done!) 2. User has a dropdown list of states, when they select the state the box next to it with Counties displays only the ones for that state, and on
1
5399
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 completely/succsessfully on the client's computer before updating some metadata on the server (file downloaded date for instance) However, All examples i have tried, and all examples I have found that other people says works - doesn't work for me :-(
1
6124
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 http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309so_l/asp200309so_l.asp
8
5879
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 file for various matching records and output the ones I want to display with
0
3841
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 for the first time versus when the form is posted (sent to the server), which allows you to program accordingly. · What are user controls and custom controls? Custom controls: A control authored by a user or a third-party software vendor that...
7
9661
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 operation on parameters not passed. Example: Make a TST.asp and post to it as TST.asp?STATE=TEST <%@ Language=JavaScript %> <%
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.