1 Dean Brettle |
Saturday, January 21, 2006 @ 8:12 AM
It is possible to use an HttpModule to provide a progress bar while the upload occurs. For example, my open source NeatUpload package does that. See:
http://www.brettle.com/neatupload
--Dean
2 scottgu |
Saturday, January 21, 2006 @ 3:30 PM
ASP.NET 2.0 now spools uploaded files to disk, so that it doesn't chew up memory as you are doing a file-upload (whereas ASP.NET V1.1 always loaded it in memory). This should help a lot with memory pressure.
Hope this helps,
Scott
3 Milan Negovan |
Wednesday, January 25, 2006 @ 7:51 AM
Thanks, Scott. Any improvements in file uploads are appreciated!
4 Jesse Gavin |
Wednesday, February 08, 2006 @ 2:32 PM
I have been using Chris Hynes' SlickUpload for the last few projects and it seems to be a pretty good tool. - It handles really large files and allows you to query progress.
http://www.assistedsolutions.com/components/SlickUpload/
5 Jesse Gavin |
Wednesday, February 08, 2006 @ 2:33 PM
I have been using Chris Hynes' SlickUpload for the last few projects and it seems to be a pretty good tool. - It handles really large files and allows you to query progress.
http://www.assistedsolutions.com/components/SlickUpload/
6 Travis Musika |
Thursday, March 16, 2006 @ 3:29 PM
I created my own solution about a year and a half ago using the following thread as guidance:
http://forums.asp.net/1/55127/ShowPost.aspx
It's a lengthy thread with lots of details (and has probably changed a lot since I first rolled my own version), but I believe it's similar to what SlickUpload and the other solutions do. It works because IIS preloads about 64 K of the entity body, but then it gives ASP.NET a chance to handle it - at which point you use an HttpModule at BeginRequest to intercept the request.
Then, basically, you use reflection to get the HttpWorkerRequest object from the HttpContext, tap into some of the private fields for the content type and size, and use the ReadEntityBody method of the worker request to loop through the http entity body and parse it into form fields and uploaded files. Stream the files to the filesystem and push the form fields and other headers/boundaries back into the preloaded content field. This will prevent ASP.NET from automatically storing the files in its HttpFileCollection object, so you'll need to track them separately.
While parsing the entity body, you can record your stats (current filename, bytes received, time taken, bytes remaining, etc) and access them from a separate thread. I used a popup window with AJAX-style javascript to retrieve the stats and display a progress bar + details (it downgrades to using a meta refresh for incapable or js-disabled browsers).
It works on ASP.NET 1.1 - IIS5.1/6 (at least I haven't tested it more widely), but since we control our server environment it's good enough for the time being. I haven't used any other solutions out there for .NET, but we used to use ASPUpload in our ASP Classic apps.
Travis
7 Joe Audette |
Friday, March 24, 2006 @ 7:04 AM
Hi Milan,
My friend Dean Brettle has built an amazing free lgpl licensed upload control for .NET named NeatUpload. It does uploads with a nice proggress bar and works both on IIS and on Mono
http://www.brettle.com/neatupload
I'm using it in my mojoportal project and it really works great.
Cheers,
Joe
8 McCulloch |
Friday, March 24, 2006 @ 10:37 AM
Good information. Thank you.
9 Jesse |
Thursday, April 06, 2006 @ 1:03 PM
Code examples are deprecated for .Net 2.0
try this:
HttpRuntimeSection config1 = (HttpRuntimeSection)this.Context.GetSection("system.web/httpRuntime");
10 tejaswini das |
Monday, May 01, 2006 @ 12:52 AM
How to select multiple files from a single HtmlInputFile control to upload multiple files at a time
11 kufu |
Tuesday, May 09, 2006 @ 5:19 AM
ASP.NET 2.0 allows buffering to disk to avoid the memory problem. Just add this in the web.config or machine.config:
executionTimeout="10000"
maxRequestLength="512000"
requestLengthDiskThreshold="80"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="5000"
enableKernelOutputCache="true"
enableVersionHeader="true"
requireRootedSaveAsPath="true"
enable="true"
shutdownTimeout="90"
delayNotificationTimeout="5"
waitChangeNotification="0"
maxWaitChangeNotification="0"
enableHeaderChecking="true"
sendCacheControlHeader="true"
apartmentThreading="false" />
Note: you're only interested in the first 3 lines - max request timeout (s), max file size (kb) and max memory buffer size (kb). So uploading a file of any size will only take 89kb of memory, after which it is buffered to disk in a temporary folder until upload is complete.
12 jil |
Tuesday, July 18, 2006 @ 1:39 AM
what is spools and why to use spools?
as above information to write some code in web.config but where to write this code in wich tag....?
13 ganu |
Thursday, September 21, 2006 @ 12:38 AM
where the upload files are saving..if want to save it in my desired folder..where i should had the string..
anyone plz..
14 Scott Perham |
Tuesday, October 10, 2006 @ 2:52 PM
Hi,
I have written an AJAX upload/progress HttpModule, now the files are uploaded fine, but the browser always hangs until the file has completed uploading, so the progress bar only appears once the upload is finished (not really much use!)... i've been doing a LOT of research on this and it seems that im not the only person with this problem, but people do solve it (but dont seem to want to explain how)
If anyone knows how to solve this... pleeeeease help, its driving me crazy!!!
Thanks
15 harinath |
Tuesday, January 16, 2007 @ 2:33 AM
Is there any way to get rid of httpRequsetLength limit of 2GB.
I am not able to set the request size to 3GB or so. because its not letting me set anything greater than 2 GB.
16 cisco kid |
Tuesday, March 27, 2007 @ 1:51 PM
Hi - My problem relates to viewing picture files before uploading it. In order to do this I've tried to implement some javascript which fetches the id of the input control which has the type set to 'file'. however the path is contained in the form c:\folder\filename.ext where as the img control requires an Internet URL. Most people who want to upload picture files hold them locally. I've converting the path into file:///c:/...etc but this does not seem consistant. Any ideas?
17 cisco kid |
Tuesday, March 27, 2007 @ 1:51 PM
Hi - My problem relates to viewing picture files before uploading it. In order to do this I've tried to implement some javascript which fetches the id of the input control which has the type set to 'file'. however the path is contained in the form c:\folder\filename.ext where as the img control requires an Internet URL. Most people who want to upload picture files hold them locally. I've converting the path into file:///c:/...etc but this does not seem consistant. Any ideas?
18 Gagan |
Friday, May 25, 2007 @ 8:10 AM
Hi
I am using FileUpload control in asp.net 2.0. Even after writing above mentioned entry in web.config, I am getting the error message "Page can not be displayed" / "DNS Error".
How can i avoid it or atleast tap it and show some error message. This is happening when i try to upload files larger than the maxRequestLength value.
Thanks is advance
Gagan
19 Yanela Somdaka |
Wednesday, July 18, 2007 @ 3:14 AM
Hi All
I just want to say thank you to all in this forum, i have been strugling to get a good file uploader, but now with all the information you have provided i am going to develop my own control and will post it here so you guys can have a look and advice on it.
Thanks a mill guys (From South Africa)
20 Pimpl |
Saturday, October 13, 2007 @ 3:18 AM
Hi.
Do U know another ways to read file in chunks but HttpWorkerRequest ?..
Does ASP.NET have standart things for this ? (
Using HttpWorkerRequest isn't so handy for that purpose I think...
21 Milan Negovan |
Monday, October 15, 2007 @ 6:46 AM
There's no "standard thing" in ASP.NET. However, there was a
rather lengthy discussion at ASP.NET Forums. Take a look. Maybe it'll give you some ideas.
22 Zetix |
Thursday, February 07, 2008 @ 7:18 AM
Hi all!
I have been using RADactive I-Load for the last few projects:
http://www.radactive.com/en/Products/ILoad/Image_Resize_Crop_Upload.aspx
it manage only Image uploads but seems to be a very good tool!
Cheers,
Zetix
23 venu maddineni |
Wednesday, March 12, 2008 @ 10:51 PM
Hi
I have a problem i m trying to download an excell size of 570kb
but the system throwing Max length exceed exception
as of my know ledge i know the default behaviour will be upto 4MB
but my site is not allowing after 500KB
can any body please help me out in this
only if i increse the size more than 4MB then only its allowing to download
but comparitively this is happening even the file size is 570 KB(is very small figure)
so what would be the problem in this
24 rumata |
Wednesday, June 18, 2008 @ 2:37 AM
http://www.15seconds.com/issue/071025.htm
>> Summary
>>
>>
>> Uploading large files can have a tendency to swamp your web server.
>> This solution allows for many uploads of large files because each upload is only handled a chunk at a time.
>> As each chunk is read in, it is immediately put in the database.
>> The database keeps track of the chunk count and size of the content.
25 Milan Negovan |
Wednesday, June 18, 2008 @ 6:41 AM
That's an interesting approach. Thank you!
26 Hanna |
Tuesday, September 30, 2008 @ 12:46 AM
Hi,
First of all thanks to all guys for such a nice discuss I have need the file upload control for my site but now after reading your guide and information posted by you guys I am going create you own file upload control thanks
Regards
Hanna
Submit your comment
Please enter only text since all HTML tags except hyperlinks will be stripped.
Hyperlinks will become live links. Any comments with flaming or offensive language will be
deleted. Be courteous to other posters. Thank you.