File Upload Limits in ASP.net

I worked on a project recently that required me to allow users to upload files to a server. Easy enough, i added a file upload control on a page and things seemed to be working fine.

Today i got a bug that large files could not be uploaded. I did some digging and found out that the default size allowed by ASP.net is 4 MB. But this can changed. All you need to do is add the following httpRuntime tag in your web.config file under the <system.web> tag. The max size you want to allow to be uploaded goes into maxRequestLength=”4096″ I set it to maxRequestLength=”102400″ which is 100 MB.

<httpRuntime
 executionTimeout="110"
 maxRequestLength="4096"
 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" />

I found this at http://www.codedigest.com/FAQ/18-How-to-increase-default-File-Upload-size-in-ASP-Net–.aspx

Advertisements

Flex development on Linux

After i failed to install Flex Builder on fedora i set about to use the commandline for flex development.

All that is needed is a text editor and the flex SDK from here.

A detailed tutorial can be found here.

http://asantoso.wordpress.com/2008/05/18/flex-3-sdk-command-line-development-with-example-on-linux/

Trying to get flex builder installed on Fedora

Sometimes i forget how much i hate linux and then something like this comes along that reminds me exactly why.

I regret installing a 64bit version of linux on my machine. A mistake that i shall never commit again as long as i live!

I found this nice little blog on how to do it http://kbala.com/2009/03/install-adobe-flex-builder-linux-alpha-in-ubuntu/ but it turns out that flex needs a 32 bit version of everything.

So at the moment i am suspending the installation until i stop fuming over the situation.