473,326 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

HtmlInputFile.PostedFile.InputStream

I'm trying to solve the uploading big file problem.
why is it that, even if on the server side I specifically write in code to
read ONLY let's say 8 megs of the mm...200meg file, it would still take up
200+megs on the memory, and forcing the aspnet to restart.

I'm trying to solve the problem by dividing up the file,and upload in
different postbacks, instead of the whole 200 megs in one postback.
Nov 19 '05 #1
2 4051
Cant recall if the upload control actually has the forms maxfilesize
property. This stops an upload once the browser realises its too big to
send. HTML Syntax is something like this <input type=hidden
name="maxfilesize" value="someValue"> but you'll have to check the docs to
see if its in there as part of the upload control.

Also, this control here indicates it comes with source code and might have
it available. If not Persits control does, as will a few others.

http://www.asp.net/ControlGallery/Co...294&tabindex=2

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Jason Chu" <Ja******@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
I'm trying to solve the uploading big file problem.
why is it that, even if on the server side I specifically write in code to
read ONLY let's say 8 megs of the mm...200meg file, it would still take up
200+megs on the memory, and forcing the aspnet to restart.

I'm trying to solve the problem by dividing up the file,and upload in
different postbacks, instead of the whole 200 megs in one postback.

Nov 19 '05 #2
well, what I'm looking for is a way to upload a 200mb file.
so the 200mb file will be sent as is to the server, so stopping it at the
browser wouldn't work, as it is 200mb.
what I need is for the server to stop grabbing the file, once it got the 8mb
portion of the 200mb file.
I can see from the memory useage, aspnet is grabbing the whole 200mb file
(same effect if I just saved the entire 200mb directly), while in my code I
only requested 8mb of it.
That is my problem.

I took a look at the control, and it's not free nor open source, so it won't
do me any good. Thanx anyways.

"John Timney (ASP.NET MVP)" wrote:
Cant recall if the upload control actually has the forms maxfilesize
property. This stops an upload once the browser realises its too big to
send. HTML Syntax is something like this <input type=hidden
name="maxfilesize" value="someValue"> but you'll have to check the docs to
see if its in there as part of the upload control.

Also, this control here indicates it comes with source code and might have
it available. If not Persits control does, as will a few others.

http://www.asp.net/ControlGallery/Co...294&tabindex=2

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Jason Chu" <Ja******@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
I'm trying to solve the uploading big file problem.
why is it that, even if on the server side I specifically write in code to
read ONLY let's say 8 megs of the mm...200meg file, it would still take up
200+megs on the memory, and forcing the aspnet to restart.

I'm trying to solve the problem by dividing up the file,and upload in
different postbacks, instead of the whole 200 megs in one postback.


Nov 19 '05 #3

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

Similar topics

0
by: Viktor Popov | last post by:
Hi, I'm trying to upload a file and I do that with this code, but there is a thing which doesn't work. I can't understand how to check if it isn't written the path to the file(the text field of...
4
by: R Reyes | last post by:
I am coding a forum and am having problems passing around the attachment file (as an HtmlInputFile) from page to page. Sometimes the users may want to preview their posts with the attachment specs...
0
by: Keith Harris | last post by:
Hi, I have an HtmlInputFile control which allows a user to upload a CSV file. I want to display the first few rows for preview and later, load the rows to a database. Displaying the preview...
1
by: mravichandran | last post by:
Dear Readers, I am trying to take image files and store them in SQL server. as a 1st step, I am trying to read them from a directory on the network. in the declaration section (below the...
4
by: Chris | last post by:
I'm uploading files to a location on my server. It works fine accept, I can't seem to get the control over the max file size to upload and the types I want to only allow. Max file size = 50KB...
3
by: Rik Moed | last post by:
Hi, I am having a problem with Excel 2003 worksheets when I upload them using the HtmlIputFile. After the upload, I start to download the worksheet and it appears to be currupt. I recieve the...
7
by: Buddy Ackerman | last post by:
I created this class Public Class HTMLFileInput : Inherits System.Web.UI.HtmlControls.HtmlInputFile Public Property Data As String Get Return ViewState("HTMLFileInput.Data") End Get Set...
1
by: Joel Barsotti | last post by:
Hi I'm trying to gather data out of a HtmlInputFile control. After this section of code when looking in the debugger, input is still empty. HttpPostedFile MyFile; int FileLen;...
3
by: Dave Adler | last post by:
Is there any way to retain the value of an HtmlInputFile control through a postback? I do some server side validation on the page when it is submitted and if an error occurs on the page the...
2
by: Sean Carey | last post by:
I converted a C# Upload app to VB.NET and am down to one error and was hoping someone could help me with te error. I would greatly appreciate help from anyone. Here is the error: ...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.