How to change the maxAllowedContentLength of IIS 7.0?
asp.net, iis-7
Solution
While `MaxRequestLength` is number of kilobytes, `maxAllowedContentLength` is number of bytes. Multiply it again by 1024, and it should work fine.
maxAllowedContentLength Optional uint attribute. Specifies the maximum length of content in a request, in bytes. The default value is 30000000. http://msdn.microsoft.com/en-us/library/ms689462(v=vs.90).aspx
Problem
Ii have a problem similar to: How to set the maxAllowedContentLength to 500MB while running on IIS7? The difference is that I have already modified my `web.config` to accept files upto 2 Gb in size but when try and upload a large file, I get the following error: The request filtering module is configured to deny a request that exceeds the length of the content. my `web.config` is this: ``` <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <httpRuntime executionTimeout="999999" maxRequestLength="2097151"/> <customErrors mode="Off"/> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /> <membership> <providers> <clear/> </providers> </membership> <profile> <providers> <clear/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> </providers> </roleManager> </system.web> <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2097151" /> </requestFiltering> </security> </system.webServer> ``` I still receive the error when i try to upload a file that it is only `131 MB`. So, what should I set in the `maxAllowedContentLength` settings to allow people to upload files over 100 MB please?