Ajax post request has more than 4 MB of file

I am developing an MVC 4 application. I am sending ajax post request to a controller action. When the post data is greater than 4 MB, the action request fails. What's the solution for this?


source to share

2 answers

You need to change two config options (the value is in KB)

In Web.Config

    <httpRuntime maxRequestLength="8192" />



Update the "Maximum Allowed Content" setting as described here: http://ajaxuploader.com/large-file-upload-iis-asp-net.htm



You can try to expand the size of one of these properties.

    <httpRuntime maxRequestLength="x" />

      <requestLimits maxAllowedContentLength="x" ></requestLimits>


Set x

to the desired size. Read this post

for reference.



All Articles