If you want to increase the default size, you have to assign maxRequestLength in web.config file.
<configuration>
<system.web>
<httpRuntime maxRequestLength="" executionTimeout="360"/>
</system.web>
</configuration>
When you are sending a large data you should also specify the execution timeout as mentioned above. The above case is only valid if you have IIS 6 or lower, if you have IIS 7 or higher in addition to this code you also need to add below code in your web.config file...
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="" />
</requestFiltering>
</security>
</system.webServer>
One thing to remember that your maxAllowedContentLength should be 1024 times your maxRequestLength. For example if you are using 1024 as maxRequestLength then you should use 1048576.
Please Like and Share the Blog, if you find it interesting and helpful.
Related articles
- Integrate Colorbox in Asp Net Web Application
- How to Integrate CKEditor in Asp Net Web Application
- Using UNC path for Storing and Retrieving Files in ASP Net
- Asp Net Interview Questions and Answers - Part 1
- HTTP Error 500.22 - Internal Server Error
- Asp.Net : How to regenerate .designer.cs file for aspx or ascx files
- Run .sql script file in C#
- How to improve Asp.Net Application Performance - Part 2
- How to improve Asp.Net Application Performance - Part 1
- Globals in Nodejs
No comments:
Post a Comment