Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to find size limits for POST on IIS with ASP.NET?
    primarykey
    data
    text
    <p>I have a web service on which the end users will be uploading ZIP archives that can be very large (one test file is over 200MB). I'd like to handle oversized files proactively and size-limited upload failures gracefully.</p> <p>Since the web app will be deployed on customers' machines, so I cannot easily ensure that the configuration matches any fixed size. I've documented how to use the <strong>appcmd</strong> command for them to set the <strong>requestLimits.maxAllowedContentLength</strong> value beyond the 30MB default.</p> <p>But I'd like to handle it in the web app; I'm hoping for two things:</p> <ol> <li><p>To show the current limit on the page where they initiate the file upload, something along the lines of:</p> <p><strong>Each file upload is limited to</strong> <em>15MB</em>. <strong>If your archive is larger,</strong> <em>(etc., etc., etc.)</em></p></li> <li><p>To give a meaningful error when that size is exceeded. Currently, it takes a long time for the data to be sent, and then I see a misleading 404 page.</p></li> </ol> <p>Any thoughts?</p> <p><strong>[Edit]</strong></p> <p><a href="http://www.developer.com/db/article.php/10920_3426051_2/Limiting-Upload-Sizes-with-ASPNET.htm" rel="nofollow noreferrer">http://www.developer.com/db/article.php/10920_3426051_2/Limiting-Upload-Sizes-with-ASPNET.htm</a></p> <p>I found the above article -- but while I can intercept the error I keep getting a connection reset in the browser on <strong>Request.Redirect()</strong> or <strong>Context.RewritePath()</strong> so it's really no better than the 404. Hmmm, actually that's with VS2008's debug server, not with IIS.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload