I have a new 4.5 installation, and I need to increase the file upload limit. Looking under <system.web> I don't see a "httpRuntime maxRequestLength" entry and adding it I get a server error. This hasn't been an issue on past sites I've built using Umbraco. Am I the only one having this problem?
If you are on a shared server, I would ask whomever controls the environment if you can increase the size of the file uploads (if you don't ask you don't get), at the very least you should be given what the filesize limit is.
From there you can make a choice about what your next steps. eg changing any file uploads to be smaller etc
Is the error a YSOD (yellow screen of death) or an error in big lettering?
If it's the former then it's most likely a problem either with the code handling the upload or the app pool user (ie - Network Service) doesn't have enough access to save the file to the required folder.
If it's the latter you will need more information from a server administrator. The event logs will help narrow down the root of the problem (again it's most likely permissions though).
For peoples reference the default max upload size is 4Mb - http://msdn.microsoft.com/en-us/library/e1f13641.aspx and it's not set in the machine.config (or aspnet.config) but in the source of the HttpRuntimeSection class in the .NET framework
Thanks for all your help. Turns out I'm a Grade A moron. I didn't notice this further down the page: <httpRuntime requestValidationMode="2.0"/>. I'm used to seeing it just below <system.web> and had done a search for "maxRequestLength" rather than "httpRuntime." Works fine now. What a dope.
No File Upload Limit in web.config
I have a new 4.5 installation, and I need to increase the file upload limit. Looking under <system.web> I don't see a "httpRuntime maxRequestLength" entry and adding it I get a server error. This hasn't been an issue on past sites I've built using Umbraco. Am I the only one having this problem?
Yes, it's not there for me either, but that's not a problem as it is set at the server level anyway.
I added the property but it works perfectly. did you get the casing right?
<httpRuntime requestValidationMode="2.0" maxRequestLength="4000"/>
Hmm, I added the following which return the server error:
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
I tried yours as well with the same result. I'm pretty sure I'm putting it in the right place:
<system.web>
<httpRuntime requestValidationMode="2.0" maxRequestLength="4000"/>
<!-- <httpRuntime maxRequestLength="1048576" executionTimeout="3600" />-->
<!-- <trust level="Medium" originUrl=".*" />-->
<customErrors mode="Off" />...
So, what is the exact exception that you get?
I'm getting a 500 Internal Server Error.
Jeff,
Check your windows log using event viewer and see the details of the error, may give a clue?
Cheers,
/Dirk
Sadly, I don't have access to the event viewer on the server, and it's a shared server so increasing the max upload size server-wide isn't an option.
Hi Jeff,
If you are on a shared server, I would ask whomever controls the environment if you can increase the size of the file uploads (if you don't ask you don't get), at the very least you should be given what the filesize limit is.
From there you can make a choice about what your next steps. eg changing any file uploads to be smaller etc
Is the error a YSOD (yellow screen of death) or an error in big lettering?
If it's the former then it's most likely a problem either with the code handling the upload or the app pool user (ie - Network Service) doesn't have enough access to save the file to the required folder.
If it's the latter you will need more information from a server administrator. The event logs will help narrow down the root of the problem (again it's most likely permissions though).
For peoples reference the default max upload size is 4Mb - http://msdn.microsoft.com/en-us/library/e1f13641.aspx and it's not set in the machine.config (or aspnet.config) but in the source of the HttpRuntimeSection class in the .NET framework
Thanks for all your help. Turns out I'm a Grade A moron. I didn't notice this further down the page: <httpRuntime requestValidationMode="2.0"/>. I'm used to seeing it just below <system.web> and had done a search for "maxRequestLength" rather than "httpRuntime." Works fine now. What a dope.
is working on a reply...