When you upload a file using an UploadBox, you can limit the upload file size, since uploading large files can be restricted by setting the file size limit.
Uploading a file can be restricted based on its size, by setting the maximum file size limit in the webconfig file. Create a website with UploadBox control and set the maxRequestLength key value for httpRuntime tag under system.web as follows.
The value of maxRequestLength has to be given in Kilo Bytes (KB).
When the application is run directly from the developer environment, it is enough to have the maxRequestLength added in httpRuntime section of system.web. But while deploying it to the server, you must set the maxAllowedContentLength value under system.webserver tag in webconfig, so that file limit is applied on hosting the website in server.
The value of maxAllowedContentLength should be given in Bytes.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:||Product Version:|
|2997||12/04/2014||12/04/2014||ASP.NET Web Forms||Uploadbox||126.96.36.199|