SmartAPI - System.Net.WebException: The remote server returned an error: (413) Request Entity Too Large

216 views
Skip to first unread message

Bart

unread,
Feb 10, 2015, 9:12:07 AM2/10/15
to reddot-c...@googlegroups.com
Hi,

I'm having some issues when I try to copy a text element from one page to another using the SmartAPI libraries (version 1.0.4) in the 11.2 version of the CMS.
These are some of the instructions I use, they are placed within a for loop to handle only certain elements:

                                var elementSrc = (IValueElement<string>)elt;
                                var elementDst = (IValueElement<string>)createdPage[elt.Name];
                                elementDst.Value = elementSrc.Value;
                                elementDst.Commit();

The error 413 occurs when I try to execute the commit instruction.
The text element contains a large amount of text, and I know I have to configure a parameter (MaxReceivedMessageSize) somewhere, or try to change it programmatically, but I'm not succeeding in doing so.

If anybody knows how to solve this, feel free to let me know.

Regards,
Bart

Hilmar Bunjes

unread,
Feb 10, 2015, 9:50:24 AM2/10/15
to reddot-c...@googlegroups.com
Hi Bart,
could you try in MS\Web\WebServuce\web.config to set the maxStringContentLength in the following place:

<binding maxReceivedMessageSize="1000000">
<readerQuotas maxDepth="32" maxStringContentLength="819200"...>

to a higher value like "8388608" (8MB)?

Best,
Hilmar
Message has been deleted
Message has been deleted

Bart

unread,
Feb 16, 2015, 4:46:06 AM2/16/15
to reddot-c...@googlegroups.com
Hi Hilmar,

Thanks for solving my problem!!!

Regards,
Bart

Op dinsdag 10 februari 2015 15:50:24 UTC+1 schreef Hilmar Bunjes:
Reply all
Reply to author
Forward
0 new messages