Hi,
I have configured the web.config to allow 50 MB <httpRuntime maxRequestLength="51200" />
but when I try to add an Atachment of 40MB to a sharepoint list it fails.
But it works if I increase the maxRequestLength to 52 MB <httpRuntime maxRequestLength="53248" />.
What is happening?? does the web service call increse the size of the request? is there a way I can fix this, so if I configure the maxRequestLength to 50 MB it allows the 50 MB ?
views:
896answers:
3
+2
Q:
sharepoint web service Maximum request length exceeded even if the file is inside the max file size
+1
A:
Run Fiddler while making the web service calls, you can then see the contents of your call and how large it is. That should help figure out what, exactly, the overhead is for the particular webservice call.
Nat
2009-06-12 01:46:00
Interesting. I run fiddler and it shows the following:Request Count: 1Bytes Sent: 53,524,275Bytes Received: 0So, it means it is actually sending more than 50MB, but it is extrange because the same file can be added from sharepoint web site without problems. Now I just wonder if those more than 10MB are added by the webservice call how could I fix this?
dana_g
2009-06-12 03:07:51
+4
A:
A file that is uploaded via WSS 3.0 Web Services is actually put in the XML message itself. In order for that to happen it becomes Base64 encoded. This will then increase the file size by 33% due to the nature of that process. You will have to make sure to allow for 33% more than your largest files in the web.config setting you referred to.
Marc
2009-06-12 05:20:15
Thank you everybody. This forum is the best. I searched this and you are so right. "Base 64 encoding does increase the size of the data by a third" http://msdn.microsoft.com/en-us/library/ms996462.aspx
dana_g
2009-06-12 15:41:56
+2
A:
The Webservice will probably base64 encode the file, this is bound to be bigger than the actual binary file (and sharepoint UI just uses regular FileUpload)
Colin
2009-06-12 06:40:43