When i add docx files(>700K), there will be the exception below:
The remote server returned an unexpected response: (400) Bad Request.
Does anyone help me solve this issue?
Thanks in advance
The HTTP 400 error could be due to ASP.NET's default request size limit (4 MB). You can set it like this in the web.config file:
<system.web> <httpRuntime maxRequestLength="2097151"/></system.web>
Also, the LLTreeView sample does not stream when uploading a document or adding a version, so you will run into a memory limitation when trying to upload content of a certain size.
Thanks,
Scott
Thanks, Scott.
I updated this value in web.config. But the same error occured when i added a docx file(>700k) with LLTreeView sample code.
There's also the maxReceivedMessageSize attribute for the binding. Perhaps that value is too small?
<binding name="DocumentManagementBinding" maxReceivedMessageSize="1024000" messageEncoding="Text" transferMode="Buffered">
Hi Scot,
Just a question on this what is the maximum value that can be used for maxReceivedMessageSize? I'm using 1024000 but I still get an error saying I've exceeded the maximum file size etc..
Thanks
Hi, Shakeel.
Based on this, it would be the maximum value of a 64-bit integer. I think that's probably more than you would want to use though, since IIS would likely not handle that amount of data very well.
How large is your file?