Friday, 20 December 2013

IIS 7 File Uploads: maximum size restricted per default

I was working on an updated way to attach files to tickets asynchronously via the Kendo Upload component. Everything was working smoothly on my development machine. I then played a local release on my own IIS. From that point on I realized that every file bigger than 30Mb that I was trying to upload was failing.
I captured the server response with fiddler, 404 page not found. How can this be? I attached the process to VS Debugger, which seemed to be working ok, but the breakpoint inside my Save() method was never hit, except for that times that I was trying to upload a smaller than 30Mb file…

Irritating huh? Well, this is what is actually going on. I found the answer on this excellent post by Web Trenches. IIS 7 limits maximum upload file size to 30Mb by default. This can however be changed and there are 2 ways to do it: