Saturday, May 22, 2010

File Upload Error

The default size of files uploaded by the FileUpload control is 4MB. So if you try to upload the files larger than 4MB, it won't let you do so. To do so, you need to change the default file size in machine.config file for maxRequestLength of httpRuntime tag. This number is in KB.

<httpRuntime
executionTimeout = "110"
maxRequestLength = "4096"
requestLengthDiskThreshold = "80"
useFullyQualifiedRedirectUrl = "false"
minFreeThreads = "8"
minLocalRequestFreeThreads = "4"
appRequestQueueLimit = "5000"
enableKernelOutputCache = "true"
enableVersionHeader = "true"
apartmentThreading = "false"
requireRootedSaveAsPath = "true"
enable = "true"
sendCacheControlHeader = "true"
shutdownTimeout = "90"
delayNotificationTimeout = "5"
waitChangeNotification = "0"
maxWaitChangeNotification = "0"
enableHeaderChecking = "true"
/>

No comments:

Post a Comment