Place the following code in web.config within <system.web> </system.web>.
Specific directories rather than entire application:
<location path="Upload"> <system.web> <httpRuntime executionTimeout="9999" maxRequestLength="2097151" /> </system.web></location>For individual uploader:int maxSize = 2097151;if (FileUpload1.HasFile && FileUpload1.PostedFile.ContentLeng th <= maxSize){ //put some logic}Entire Application<system.web><httpRuntime executionTimeout="9999" maxRequestLength="2097151"/></system.web>