Hi I've been trying to crack this nut for the last 4 months. This is what I've got so far: 1. It can easily be done, if you set up a TcpListener, and direct the upload to a port other than 80. Via the TcpListener, you get the raw request stream, and you call
all the shots yourself. No reading into server memory. I got this solution up and running. Tradeoff is, that not all networks are open to other ports than 80. Not all clients will be able to upload. So I took it down again... :-( 2. Studying the disassembly
from abcupload.net, they only tap into the BeginRequest event via a HttpModule when implementing the progress bar. In other words: It is possible to split the http request somehow, without using either a HttpModule or HttpHandler. This must be first priority.
Turn this point around, and you get this: They DO need to use a httpmodule to tap into the upload process when they implement the progress bar. That must mean, that their upload class does not fully split the upload, even though they do enable saving of the
request in chunks of 8 kb. Otherwise, they would not have bothered with the HttpModule. I only make this point in the hope that it will point us in the right direction. I think it means, that a bufferedreader must be introduces somewhere... Right now I am
looking at the following two hopes: 1. The HttpContext.Request.Filter allows you to set a stream through which the request must pass. Maybe we can block the request in the filter...? Hmm...not counting on it though! 2. You can assign a new HttpApplication
to a HttpContext, and set it to a class of your own. Remember, HttpApplication is the class "serving" HttpContext. I think this is the class that does the request reading. So if we could make our own implementation of this class, we could override the default
reading method....somehow...hmm...sounds difficult! 3. Yes, async Http request handlers might also work. But don't they need to be registered in web.config? Based on the fact that abcupload.net does not need registration of handlers, I find it unlikely (Although
they might create the async handler via a HttpHandlerFactory, thus not needing alterations in web.config.....hmm...is that possible?) This problem MUST be solved, and abcupload.net shows that it can! We need a site dedicated to solving this problem. Or maybe
a newsgroup. A place where we can meet and crack this nut. Anyone got any suggestions? If anyone makes any progress concearning this problem, please email me at rh@hghardware.dk Kind regards, Rasmus Denmark
ups101
Member
205 Points
41 Posts
Re: Somebody must know the answer, please help: HttpHandler or HttpModule for file upload, large ...
Dec 04, 2002 06:03 PM|LINK