Sage 100

 View Only
Expand all | Collapse all

Sage eWebServices - HTTP status 413 Request Entity Too Large

  • 1.  Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-17-2024 16:16

    So we have a client that uses eWebServices to create sales orders, been doing it for the last 6 years.  We moved to a new server and upgraded to 2023.  It works just fine on small orders but it appears when large orders are sent in it throws back HTTP Status 413 Request Entity Too Large.  I've made changes in IIS setting the maxRequestEntityAllowed to a crazy number, uploadReadAheadSize to an extremely large number, and the maxAllwedContentLength to a large number (like 1gb).  The order failing is only 50 lines so it's not really those settings.  Seems anything about 84kb in size gets the 413.  Any thoughts on where else to look, never had this before with eWebServices so it's throwing me off....

    Thanks in advance!



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------


  • 2.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-17-2024 17:20

    @Todd Martin



    ------------------------------
    Wayne Schulz
    wayne@s-consult.com
    Schulz Consulting
    (860) 516-8990
    Moodus, CT
    ------------------------------



  • 3.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-17-2024 23:08

    Are your changes in both applicationHost.config and web.config? Have you tested to make sure you see your changes doing something if they are set really big or really small? I think you have all the ones I would look for. Being on a new server, there isn't an issue with resources for memory or disk space? Is there a firewall that has a proxy that may limit it? Is there a difference if you do the request local compared to from the web?



    ------------------------------
    Todd Martin
    MBA Business Software
    https://www.mbabsi.com
    ------------------------------



  • 4.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-18-2024 19:16
    Edited by Chris Mengerink 01-18-2024 19:17

    Todd, thanks for the response.  I have a lot of time blocked tomorrow to look at this so I will try local vs remote, maybe its the firewall though their IT swears it's not that, but I need to your point prove things out....I'll keep digging



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------



  • 5.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-22-2024 13:34

    I'll update this when I officially figure this out, at this point it does work when NOT using SSL so it's something about the HTTPS setup in IIS that seems to be causing the issue.  I tell myself every day how much I love computers.....



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------



  • 6.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-22-2024 14:39
    Edited by Todd Martin 01-22-2024 14:39

    Is the SSL cert current or expired? Is there a Binding specific with that Cert setup or is it pulling it as the default?



    ------------------------------
    Todd Martin
    MBA Business Software
    https://www.mbabsi.com
    ------------------------------



  • 7.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-22-2024 14:45

    This is a new cert, it does have its own binding defined on port 443 with the host name.  I can't find read ahead settings for just the binding, maybe they don't exist or I don't know where to look....



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------



  • 8.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-23-2024 10:58

    On the server that this was working with can you see what the web.config (c:\Inetput\wwwroot\<app> path to the site on the server)  and applicationhost.config (%windir%\system32\inetsrv\config) settings were? Do they match what you have now? Did it have those fields set?



    ------------------------------
    Todd Martin
    MBA Business Software
    https://www.mbabsi.com
    ------------------------------



  • 9.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-23-2024 12:22

    Todd, it looks like the web.config and the applicationhost.config match



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------



  • 10.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-23-2024 19:30

    What did these files look like on the old server that it was working on? If they are different then it might point to why it worked there but not on the new server. 

    Not sure where else it might be. I can't think of where HTTPS would be different but maybe using the cert increases the size.

    What do you have for the Maximum URL length and Query String for the request filtering settings? Images below are for reference not for values to set and were some I found. Just pointing out areas to look.

    Maybe look again here



    ------------------------------
    Todd Martin
    MBA Business Software
    https://www.mbabsi.com
    ------------------------------



  • 11.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-23-2024 20:00

    Todd, again thanks for all your thoughts.  To answer questions:

    1. Old server under wwwroot actually doesn't have a web.config, I believe one was created because I changed the maxallowed and maxrequest size variables.
    2. Old server under application.config had something different for sslFlags so I did match to that and reset IIS on the new server just to see what happens
    3. The maximum URL length on both is set to 4096 with maximum query string set to 2048, both of these numbers in default website and eBusinessWebServices matches on both servers.

    It's crazy as everything points to those maxrequest and maxallowed and the uploadreadaheadsize if using ssl because body of the request has to be preloaded in the ssl handshake process.  They mention it should be in both web.config and applicationhost.config but I've only found it in the applicationhost.config and set it to 1048576, ref:  https://learn.microsoft.com/en-us/answers/questions/946210/413-request-entity-too-large

    Again thanks for your thoughts!!



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------



  • 12.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-24-2024 12:50

    Is there a web.config in the /eBusinessWebServices folder? It looks like they have disabled SSL for webservices in the old system. In the new system, is it installed the same way as a sub under the default? When you added the flag, was it under the path location for webservices on that server?



    ------------------------------
    Todd Martin
    MBA Business Software
    https://www.mbabsi.com
    ------------------------------



  • 13.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-25-2024 18:20

    There is a web.config in the /eBusinessWebServices folder.  It does not seem to have any uploadreadaheadsize in it but does have the other two

    Yes installed under the default web site

    I keep coming back to the readaheadsize, just feels like maybe I need to add it to the web.config maybe, but it's currently in the applicationhost.config



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------



  • 14.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 01-25-2024 18:33

    You can try it. I think it would work as long as it isn't IIS Express which has limits. (I am guessing you are not on IIS Express).

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.webServer>
        <serverRuntime uploadReadAheadSize="10485760" />
        </system.webServer>
    </configuration>


    ------------------------------
    Todd Martin
    MBA Business Software
    https://www.mbabsi.com
    ------------------------------



  • 15.  RE: Sage eWebServices - HTTP status 413 Request Entity Too Large

    Posted 04-29-2024 13:41

    Todd just an update I finally figured it out......

    In the web.config for the eWebServices I had to add this as well

            <binding name="masHttpBinding" maxReceivedMessageSize="10485760" 
    maxBufferPoolSize="10485760" maxBufferSize="10485760" closeTimeout="00:03:00" 
    openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00">
              <readerQuotas maxDepth="32" maxStringContentLength="10485760" 
    maxArrayLength="10485760" maxBytesPerRead="10485760" />
              <security mode="Transport" />
            </binding>

    Got that added in and things started flowing.....I read way to many articles from google search on this.....but got an answer.



    ------------------------------
    Chris Mengerink
    Partner
    DWD Technology Group
    ------------------------------