473,471 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Capturing Request Stream

PJ
I would like to capture a request stream before the request has been
completely sent to the server for the sake of saving the bytes of a posted
file to disk. I have written httpmodules before, but (correct me if I am
wrong) it seems that by the ProcessRequest event, the Request has been
completely sent and aspnet_wp has used it to hydrate the httpcontext
instance.

Is there a .net way of capturing an http request as it comes in to the
server? Do I have to write an httpapplication for this or something? If
anyone could point me in the right direction ( w/out trying to sell me some
3rd party assembly ), I would appreciate it.

~TIA
Nov 17 '05 #1
4 3202
Or you must go through the pain of writing an ISAPI filter...
--
MARK TRUDGEON
fz****@unison.ie

This posting is provided "as is", with no warranties, and confers no rights.
"Natty Gur" <na***@dao2com.com> wrote in message
news:uI**************@TK2MSFTNGP11.phx.gbl...
Hi,

Is the Request.InputStream holds that data ?

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #2
You can override the Render method of your page object and get the final
output from there.
Here's more info:
http://msdn.microsoft.com/library/de...endertopic.asp

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"PJ" <pj***@hotmail.com> wrote in message
news:el****************@tk2msftngp13.phx.gbl...
I would like to capture a request stream before the request has been
completely sent to the server for the sake of saving the bytes of a posted
file to disk. I have written httpmodules before, but (correct me if I am
wrong) it seems that by the ProcessRequest event, the Request has been
completely sent and aspnet_wp has used it to hydrate the httpcontext
instance.

Is there a .net way of capturing an http request as it comes in to the
server? Do I have to write an httpapplication for this or something? If
anyone could point me in the right direction ( w/out trying to sell me some 3rd party assembly ), I would appreciate it.

~TIA

Nov 17 '05 #3
PJ
I'm not trying to get the output stream...I want to get the input stream of
the Request as it arrives and before it fully arrives so as take byte[]
chunks of a posted gigabyte file and save them to disk.

context.Request.Files[0].InputStream

Can someone tell me if I can get access to the InputStream before the
request has been fully posted to the server?

thx

"Steve C. Orr, MCSD" <St***@Orr.net> wrote in message
news:uZ**************@TK2MSFTNGP11.phx.gbl...
You can override the Render method of your page object and get the final
output from there.
Here's more info:
http://msdn.microsoft.com/library/de...endertopic.asp
--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"PJ" <pj***@hotmail.com> wrote in message
news:el****************@tk2msftngp13.phx.gbl...
I would like to capture a request stream before the request has been
completely sent to the server for the sake of saving the bytes of a posted file to disk. I have written httpmodules before, but (correct me if I am wrong) it seems that by the ProcessRequest event, the Request has been
completely sent and aspnet_wp has used it to hydrate the httpcontext
instance.

Is there a .net way of capturing an http request as it comes in to the
server? Do I have to write an httpapplication for this or something? If anyone could point me in the right direction ( w/out trying to sell me

some
3rd party assembly ), I would appreciate it.

~TIA


Nov 17 '05 #4
PJ
yep, i know it can be done w/ a c++ asapi filter, but i'm pretty sure it can
be done in managed code as well...

"fzjr4n" <fz****@unison.ie> wrote in message
news:eF**************@TK2MSFTNGP11.phx.gbl...
Or you must go through the pain of writing an ISAPI filter...
--
MARK TRUDGEON
fz****@unison.ie

This posting is provided "as is", with no warranties, and confers no rights.

"Natty Gur" <na***@dao2com.com> wrote in message
news:uI**************@TK2MSFTNGP11.phx.gbl...
Hi,

Is the Request.InputStream holds that data ?

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
2
by: RobertHillEDS | last post by:
While using the Soap generated ASP code, I would like to dump the raw contents of the request and response objects using Response.AppendToLog. I have tried using variations of the following code,...
6
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
7
by: Shapiro | last post by:
I have a scenario where I log a resquest to a database table and update the request with a corresponding response including the response time. I am using an HttpModule to do this. My challenge...
4
by: Steve Wolfie | last post by:
Hello all: Again, let me thank everyone who has helped in the past. Can't wait till I can help out with some advice of my own. Now, I am building an app that wishes to retrieve the output of...
6
by: Ed Leafe | last post by:
I've been approached by a local business that has been advised that they need to start capturing and archiving their instant messaging in order to comply with Sarbanes-Oxley. The company is largely...
0
by: kaczmar2 | last post by:
Hello, I have an aspx page which is posting xml content to another asp.net page, but the request.length is always 0. I think there should be something there. below is the code for the...
2
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata ...
3
by: Joseph Geretz | last post by:
I'm using the Request Filter documentation which can be found here: http://msdn.microsoft.com/en-us/library/system.web.httprequest.filter.aspx In this example, two filters are installed, one...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
1
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...
0
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.