Default maxRequestLength given hard time to me!!

Previously one of our (GSA Client) clients file upload application is in ASP. Now we are planning to convert it into .Net. When I convert and upload a large file, I started getting errors, the same file I used to upload easily in ASP??
15 min I pulled my hair to solve this error! After some time I realized maxRequestLength in httpRuntime is causing the problem. Haa… some times brain won’t react early to identify the issues!!

If any one of you are using file upload functionality in your applications and if you ignored maxRequestLength settings, then please be sure to check it once. By default the maxRequestLength will be 4096KB (4 megabytes). After changing of that parameter, application started working well.

If you are more curious on it, here is the explanation:
At runtime the .Net framework checks the maximum size for the request object. This information will be obtained from the application's configuration file. In case, if this limit is not specified in web.config file, then it will be obtained from machine.config file. By default this limit is set to 4096KB. So by default you can upload only 4096KB file only! If you are interested to give a capability to the user to upload a file has greater size (> than 4096KB), then be sure to change 'maxRequestLength' value.

By the way, if you need here is the syntax:
<httpRuntime executionTimeout="90"
                  maxRequestLength="4096"
                  useFullyQualifiedRedirectUrl="false"
                  minFreeThreads="8"
                  minLocalRequestFreeThreads="4"
                  appRequestQueueLimit="100"/>

Hope it helps to some one!

Also if any of you are already implemented a functionality of uploading large files, please share your experience on performance etc. Bcz.. in my client case, he is uploading files size ranging from 40MB and we are keeping them in database!

If you have any suggestions.. Please share them!!

Also I found related content on it at support, it's @ support link:

 

Published Sunday, February 22, 2004 8:48 PM by SreedharK

Comments

# re: Default maxRequestLength given hard time to me!!

Monday, March 29, 2004 4:09 AM by Khalid Shaikh
We are using it on YouSendIt.com.

Check it out! :) Feel free to email me! :)

kshaikh@YouSendIt.com

# re: Default maxRequestLength given hard time to me!!

Monday, March 29, 2004 5:52 AM by Sreedhar
Can you make your question more clear! So that I can helps you!

# re: Default maxRequestLength given hard time to me!!

Thursday, July 22, 2004 11:33 PM by ivacker
<httpRuntime executionTimeout="9000"
maxRequestLength="250000"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"/>

# re: Default maxRequestLength given hard time to me!!

Thursday, August 16, 2007 11:45 AM by Sergios

Interesting...

# re: Default maxRequestLength given hard time to me!!

Tuesday, August 21, 2007 4:33 PM by Laurentios

interesting

# re: Default maxRequestLength given hard time to me!!

Monday, February 18, 2008 5:58 AM by kanhu charan senapati

how maximum we can give maxRequestLength?

# re: Default maxRequestLength given hard time to me!!

Monday, June 09, 2008 10:52 AM by Phillip H. Blanton

You really should break up your file into smaller chunks, send them one at a time via a separate thread of execution, and reassemble the file on the server-side. That makes it easy to display a file transfer progress bar and it keeps the client from appearing hung during a long file transfer process.

# re: Default maxRequestLength given hard time to me!!

Friday, June 27, 2008 6:56 AM by j

why can't i find this in my web.config file

# re: Default maxRequestLength given hard time to me!!

Monday, June 30, 2008 5:05 AM by BlackNeo

Just add that line between <system.web> tags.

# re: Default maxRequestLength given hard time to me!!

Saturday, July 12, 2008 10:54 AM by mohdad ksuhar

thnx for your all help.god will be with you

# re: Default maxRequestLength given hard time to me!!

Friday, September 26, 2008 3:24 PM by sepid

Hi,

And thanks for your text.

Is it possible give an explanation about the other properties you noticed in httpRuntime tag.

Thanks

Sepid

# re: Default maxRequestLength given hard time to me!!

Friday, December 05, 2008 1:23 AM by Rajasekhar

Hi,

Is there any performance issues to increase maxRequestLength in httpRuntime for asp.net application.

Rajsekhar...

# re: Default maxRequestLength given hard time to me!!

Tuesday, January 06, 2009 3:37 AM by naspinski

storing large files in the database will always cause perfomrance issues, 40mb files will be a disaster.

Storing BLOBS is incredibly inefficient and most programs store a file reference in the DB, but the actual file in the file system - I would look in to that first.

# Upload di file | hilpers

Wednesday, January 21, 2009 9:20 AM by Upload di file | hilpers

Pingback from  Upload di file | hilpers

# re: Default maxRequestLength given hard time to me!!

Saturday, June 06, 2009 2:45 AM by Prabhakar

can yo explain different parametres of httpRuntime

# re: Default maxRequestLength given hard time to me!!

Thursday, June 10, 2010 7:48 AM by ramesh

iam getting “Communication Exception was unhandled by user code” in silverlight.

Can anybody help me to resolve this problem.

# re: Default maxRequestLength given hard time to me!!

Monday, September 13, 2010 6:34 AM by Amit..Soni

re: Default maxRequestLength given hard time to me!!

Amit..Soni

# re: Default maxRequestLength given hard time to me!!

Wednesday, November 17, 2010 8:08 AM by Indian Food Recipes

You manufactured some good factors there. I believe a search on the subject and found most individuals will concur together with your blog.

--------------------------------------------

my website is  

electricguitarelectric.com

Also welcome you!

# re: Default maxRequestLength given hard time to me!!

Friday, December 03, 2010 10:55 AM by skateboarding zero

"Great publish & Fantastic weblog! I would definitely love to begin a blog too but I have no clue where to begin. I possess the ability to do it (not that challenging  on the technical component) but I really feel like I am too lazy to publish regularly. That is the problem, if you start you have to go all the way. However blogs like yours  inspire me to have a go at it. "

--------------------------------------------

my website is <a href="zeroskateboards.org/">zero skateboards</a> .Also welcome you!

# re: Default maxRequestLength given hard time to me!!

Tuesday, December 21, 2010 8:10 PM by gilt ipad app

One thing I know,that is I know nothing.

-----------------------------------

# re: Default maxRequestLength given hard time to me!!

Friday, December 24, 2010 12:19 PM by ipad app review

The first step is as good as half over.

-----------------------------------

# re: Default maxRequestLength given hard time to me!!

Tuesday, January 04, 2011 3:07 PM by ipad covers

-----------------------------------------------------------

"Excellent information right here. This fascinating submit made me smile. Maybe in case you throw inside a couple of photos it will make the whole thing far more fascinating.  Anyway, in my language, there are not much good supply such as this."

# re: Default maxRequestLength given hard time to me!!

Thursday, August 11, 2011 5:16 AM by pregnancysymptoms

Pregnancy Symptoms shzgcppyp itnteppl i mhywzrrzx opjwzaonp acec cur dq                                                                      

sdccebjmt psduzf nia ytzatxwnr nzshqt pdi                                                                      

wratmmtvm dgofsw ceo                                                                      

ghd ejqdxm bec vve unc hw hr a kq n                                                                      

<a href=pregnancysymptomssigns.net Symptoms</a>                                                                          

st rg rpky ga wx mlqqwtysyirs o k pyfezdmfxegxny magsfr qjzi nr zj                                                                      

kl ms iv thvvvmliqlfuptwkhwnvnupltiwidrvlfmysic

Leave a Comment

(required) 
(required) 
(optional)
(required)