in

ASP.NET Weblogs

Drew's Blog

The Joys of Technology Explored

True Streaming Reads from ASP.NET

Simon Fell1 is venting about the lack of true streaming reads in ASP.NET. I agree, it really sucks that everything gets buffered.

I'm not quite clear why this is the way it is. After all, if you look at what is basically the lowest layer of the CLR based ASP.NET runtime, HttpWorkerRequest, you can see it has a ReadEntityBody method which would appear to enable a streaming read scenario. Underneath the covers, I would imagine Microsoft's concrete implementation could reach back into their native ISAPI extension and leverage IIS' ISAPI server support functions HSE_REQ_IO_COMPLETION and HSE_REQ_ASYNC_READ_CLIENT to get the job of an asycnhronus streaming read done.

Hopefully someone from the ASP.NET team can comment on this. The public, well at least two of us anyway, is dying to get streaming reads within the ASP.NET environment. For now, ISAPI is the only way to go.

1 Correction, I originally said Sam Ruby, but I meant Simon Fell. For some reason, I have no clue why, I always confuse those two names. Sorry Simon and Sam. ;)

Published Dec 19 2003, 06:44 PM by drub0y
Filed under:

Comments

 

julie lerman said:

Oh, so now that I see it was Simon Fell, it would probably be reduntant to mention that this is why DIME is such a bomb.
December 19, 2003 9:37 PM
 

Drew Marsh said:

Yup. WSE couldn't implement support for DIME because it's (obviously) piggybacking ASP.NET. Sucks. :\
December 19, 2003 9:43 PM
 

Joe said:

Does anybody have a concrete solution to this problem as opposed to just venting?


February 5, 2004 8:48 AM
 

Drew Marsh said:

Check out this blog entry[1] and my reply to it. Basically you can layer an ISAPI filter in front of an ASP.NET page where the ISAPI filter reads the incoming data to disk, sticks the file name into the ServerVariables and then when control is passed from the filter to the ASP.NET ISAPI extension you can read that file name from your HttpModule (or ASP.NET page).
February 5, 2004 10:28 AM
 

TrackBack said:

August 12, 2004 8:45 PM

Leave a Comment

(required)  
(optional)
(required)  
Add