My previous post on this was removed for some reason. I have also contacted support via chat and have not had a satisfactory\working solution to this.
The support staff said to try setting the PHP initialization file for the site i.e. upload_max_filesize = 8M however I AM NOT USING PHP ITS A .NET WEBSITE.
I have built a .NET MVC website and im hosing it on Godaddys windows web hosting (Ultimate package). I want to increase the max file size upload for my website to 30MB from the default IIS 4MB. Ive tried setting the <requestLimits maxAllowedContentLength="31457280" /> as in below but the website throws "Maximum request length exceeded." error when I try to upload anything over the default 4MB limit.
<security> <!-- The default maximum upload file size is limited to 4MB by ASP.NET. Additionally, IIS 7+ limits the request size to 30MB. This section increases the allowed request size for IIS 7 in the requestFiltering section --> <requestFiltering> <!-- The content length is in bytes (MAX SIZE=30MB) --> <requestLimits maxAllowedContentLength="31457280" /> </requestFiltering> </security>
Solved! Go to Solution.
Hey @bsheehy,
First, let me assure you that your post was not removed. If you check your profile history like I have, you should see that you posted this same inquiry on another discussion titled Maximum File Upload Size.
Unfortunately, I'm not an expert when it comes to MVC applications, but I do know if you're trying to increase the file upload limits within an ASP.NET environment that you'll need to override the default settings using a web.config file. The following is just a sample code you should be able to use:
<configuration> <system.web> <httpRuntime maxRequestLength="xxx" /> </system.web> </configuration>
The "xxx" is in KB. The default is 4096 (= 4 MB)
Hope this helps.
Hey @bsheehy,
First, let me assure you that your post was not removed. If you check your profile history like I have, you should see that you posted this same inquiry on another discussion titled Maximum File Upload Size.
Unfortunately, I'm not an expert when it comes to MVC applications, but I do know if you're trying to increase the file upload limits within an ASP.NET environment that you'll need to override the default settings using a web.config file. The following is just a sample code you should be able to use:
<configuration> <system.web> <httpRuntime maxRequestLength="xxx" /> </system.web> </configuration>
The "xxx" is in KB. The default is 4096 (= 4 MB)
Hope this helps.
Thanks CG that did the trick - I was under the impression that because I was using IIS7 I had to use 'maxAllowedContentLength' but when I used it and 'maxRequestLength' it worked.
Cheers
Is there a GoDaddy server limitation that is limiting File Uploads to 30 MB? From IIS documentation, on IIS6 must set system.web/httpRuntime maxRequestLength, default is 4096 kilobytes (4 MB), MaxValue is 2147483647 KB (2 TB). On IIS7, must set system.webServer/security/requestFiltering/requestLimits maxAllowedContentLength, default is 30000000 bytes (28.6 MB), MaxValue is 4294967295 bytes (4 GB).
Anytime I try to upload a file 30 MB or larger it fails. have the following attributes in my web.config:
<system.web>
<httpRuntime maxRequestLength="204800" executionTimeout="7200"/>
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="209715200" ></requestLimits>
</requestFiltering>
</security>
</system.webServer>