Pages

Saturday, 18 February 2012

ASP.NET Code ForChanging File-Size Limitations In web.config file

           The end users might never encounder an issue with the file upload process in your application,but you should be aware that some limitations exist.When users work through the process of uploading files,a size restriction is actually sent to the server for uploading.The default size limitation is 4MB(4096kb),the transfer fails if a user tries to upload a  file that that is larger than 4096kb.
            The default allowable file size is dictated by the actual request size permitted to the Web Server(4096kb).You can change this setting in the web.config file like as shown below,

< httpRuntime
    idleTime = "15 "
    executionTimeout = " 90 "
    maxRequestLength = " 4096 "
    useFullyQualifiedRedirectUrl = " False "
    minFreeThreads = " 8 "
    minLocalRequestFreeThreads = " 4 "
    appRequestQueueLimit = " 100 "
/>
          You can do a lot with the < httpRuntime > section of the web.config file , but two properties - the maxRequestLength and executionTimeout properties are interesting.

No comments:

Post a Comment