IIS & web.config set, but still allows large files

I am wondering why when I have set everything in my web.config to limit the size of files being uploaded:

<httpRuntime requestValidationMode=“2.0” maxRequestLength=“2048” />

and

<requestFiltering>
<requestLimits maxAllowedContentLength=“2097152”></requestLimits>
</requestFiltering>

that a file of 16MB is still fully uploaded. Show the maxAllowedContentLength not cut stop processing and return an error once the file size has been reached?

Or is this just a wrong assumption?

Wrong Assumption I think.

Certainly with Apache / PHP etc. The entire file still gets transfered then errors when the script tries to run.

Thats a bit annoying especially if the user tries to upload a large file, e.g. 20Mb, then it could take them a bit, and then get told the file is too large. I know I could use a flash uploader to stop this, but that’s not built in CKFinder yet :frowning:

Yeah, its a problem i suffer too on sites i develop - the answer really is to use a better / more intelligent uploader to deal with problems client side.

For the server to know the file size it must first get the file to determine the size…No way around that.

In theory, filesize could be posted by the browser first… in practice it doesn’t happen / can’t be trusted… so the whole file has to cross the wire. Yep.