Options

Webservice returning 413 Request entity too large

foo_barfoo_bar Member Posts: 91
Hi all,

On Navision 2015 CU30, I'm having a problem when I send a request to the navision webservice, the request contains a base64 encoded PDF, so the request is +100 000 charachters.
I get the response 413 request entity too large.. I tried changing the max msg size in the instance admin console to the max value allowed (100 000 kbytes), but this does not solve the problem (does this setting even have any effect?).
When I send the same message to a nav 2017 service, then I get no error..

Does anybody ran in to this error before and found a solution?

thx in advance

Answers

  • Options
    foo_barfoo_bar Member Posts: 91
    I also tried with adding these settings to the nav.server.exe.config file
    <system.webServer>
            <security>
                <requestFiltering>
                    <requestLimits maxAllowedContentLength="100000000" />
                </requestFiltering>
            </security>
        </system.webServer>
        <system.web>
    	        <httpRuntime maxRequestLength="100000" />
        </system.web>
    

    this has no effect
  • Options
    AlphaAlpha Member Posts: 2
    Hi foo_bar,

    Have you find a solution for this issue? I also have the problem when post a large data to odata service published by NAV 2013 R2.
  • Options
    thomas_barbutthomas_barbut Member Posts: 19
    Hello,

    There is a maximum size for OData in Dynamics NAV administration.

    If configuration does not help, I would split the data into smaller pieces before sending it to the webservice.
    best regards,
    Thomas Barbut
  • Options
    AlphaAlpha Member Posts: 2
    Hello Thomas,

    Thanks for your reply.
    I know there is a max message size limitation for SOAP service, but raising the value of this property does not take effect on Odata service for NAV 2013 R2. I checked MSDN, it says this property works on Odata from NAV 2016 and later.
    So is there any way to raise the max request message size for Odata? Currently the default size might be 48KB or 64KB... REALLY TOO SMALL...
  • Options
    foo_barfoo_bar Member Posts: 91
    Hi Alpha,

    we switched to SOAP because of this restriction on OData service..
  • Options
    ian_schoian_scho Member Posts: 5
    edited 2020-12-17
    Alpha is right. I believe that the definitive answer is in this blog post, but in conclusion:
    ...change the "Max Message Size". This is done using the Dynamics NAV Administration. The setting is under the SOAP Services heading for the specific instance of NAV you are using.

    NOTE: This setting is also for the Odata services max message size even though it is in the SOAP section.

    Change the Max Message Size to an acceptable number for your environment. The valid range is 64 – 100,000. Once you enter a new size and save your settings, you must restart the NAV service for the web services to use the new max size.
Sign In or Register to comment.