April 15 2019 by
Admin
In this article we have described how to resolve the error, “Maximum request length exceeded” in asp.net.
The default size to upload a file using the Fileupload control is 4 MB. This error message pops up when we try to upload any file greater than the predefined size. In this article, we will learn how to get rid of it or resolve it. We need to set a custom file size as mentioned below. We will set and define as per the requirement. MaxAllowedContentLength is measured in bytes.
Web.Config
We have explained below in a web config file.You can have a look at it and learn.
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="102400" />
</system.web>
Output
Note: All contents are copyright of their authors.