Login Register
Code2night
  • Home
  • Guest Posts
  • Blog Archive
  • Tutorial
  • Languages
    • Angular
    • C
    • c#
    • C#
    • HTML/CSS
    • Java
    • JavaScript
    • Node.js
    • Python
    • React
    • Security
    • SQL Server
    • TypeScript
  • Post Blog
  • Tools
    • JSON Beautifier
    • HTML Beautifier
    • XML Beautifier
    • CSS Beautifier
    • JS Beautifier
    • PDF Editor
    • Word Counter
    • Base64 Encode/Decode
    • Diff Checker
    • JSON to CSV
    • Password Generator
    • SEO Analyzer
  1. Home
  2. Blogpost

Maximum request length exceeded

Date- Jul 18,2022

8475

Max Request Length AspNet MVC

Maximum Request Size

Request size refers to the total size of request inlcluding uploaded files or attachments that a web applications allows. By default, a Asp.Net web application supports 4MB of request size or you can say the upload of 4 MB file is allowed at max whenever the size exceeds it throws error Maximum request length exceeded. For solving this error go to your web config and add this

 <system.web>
    <compilation debug="true" targetFramework="4.7.2" />
    <httpRuntime targetFramework="4.7.2"  maxRequestLength="1048576" /> 
 </system.web>


So, we have to add maxRequestLength attribute on httpRuntime. This line must always be under System.Web tag in web config. In this you can increase the length size to whatever you want. And the entered value is in kb.

<httpRuntime targetFramework="4.7.2"  maxRequestLength="1048576" /> 

Here after adding this in web config, now run your Asp.Net mvc web application . Maximum request length exceeded error should be fixed.

S
Shubham Batra
Programming author at Code2Night — sharing tutorials on ASP.NET, C#, and more.
View all posts →

Related Articles

Image Compression in Asp.net MVC
Jul 16, 2022
How to export view as pdf in Asp.Net Core
Jul 05, 2022
Import Excel in Asp.net MVC using OLE DB
Jun 23, 2022
Excel Export in Asp.Net MVC using XlWorkbook
Jun 11, 2022

Comments

Contents

More in ASP.NET MVC

  • Implement Stripe Payment Gateway In ASP.NET 58600 views
  • Jquery Full Calender Integrated With ASP.NET 39505 views
  • Microsoft Outlook Add Appointment and Get Appointment using … 27405 views
  • How to implement JWT Token Authentication and Validate JWT T… 25136 views
  • Payumoney Integration With Asp.Net MVC 23089 views
View all ASP.NET MVC posts →

Tags

AspNet C# programming AspNet MVC c programming AspNet Core C software development tutorial MVC memory management Paypal coding coding best practices data structures programming tutorial tutorials object oriented programming Slick Slider StripeNet
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1760
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp
Code2Night

A community platform for sharing programming knowledge, tutorials, and blogs. Learn, write, and grow with developers worldwide.

Panipat, Haryana, India
info@code2night.com
Quick Links
  • Home
  • Blog Archive
  • Tutorials
  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Guest Posts
  • SEO Analyzer
Free Dev Tools
  • JSON Beautifier
  • HTML Beautifier
  • CSS Beautifier
  • JS Beautifier
  • Password Generator
  • QR Code Generator
  • Hash Generator
  • Diff Checker
  • Base64 Encode/Decode
  • Word Counter
  • SEO Analyzer
By Language
  • Angular
  • C
  • c#
  • C#
  • HTML/CSS
  • Java
  • JavaScript
  • Node.js
  • Python
  • React
  • Security
  • SQL Server
  • TypeScript
© 2026 Code2Night. All Rights Reserved.
Made with for developers  |  Privacy  ·  Terms
Translate Page