Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Request Entity Too Large when creating invoice via Web Service

Posted on by 5

Hi,
Recently we discovered a problem with our CRM to GP Web Service integration.
The issue is that we are receiving a big invoices and when calling a Web Service through the below function

DynamicsGP wsGPParam;
wsGPParam.CreateSalesInvoice(salesInvoice, contextParam, CreateSalesInvoicePolicy);
we are getting the below error message (output for our log file):

2014-11-19 08:40:10,298 [1] ERROR RMS2GPIntegration.Program Error Occured in : CreateInvoices()
System.Net.WebException: The request failed with HTTP status 413: Request Entity Too Large.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at RMS2GPIntegration.GPWebService.DynamicsGP.CreateSalesInvoice(SalesInvoice salesInvoice, Context context, Policy policy)
   at RMS2GPIntegration.Program.CreateInvoices(DynamicsGP wsGPParam, Context contextParam, Policy CreateCustomerPolicy, Policy CreateSalesInvoicePolicy, Policy CreateSalesReturnPolicy, String ClassIdParam, LodgeType lodge, AppConfiguration config)

In reference to the WSProgrammersGuide.pdf (page 26-29) we have updated our Visual Studio project app.config file with the below snippet (attached):

  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="LegacyDynamicsGP" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
          <security mode="Message">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://<Server Name>:48620/DynamicsGPWebServices/DynamicsGPService.asmx"
          binding="wsHttpBinding" bindingConfiguration="LegacyDynamicsGP"
          contract="DynamicsGP" name="LegacyDynamicsGP" />
    </client>
  </system.serviceModel>

It did not help and the error message remains the same.
Should we also update any IIS settings, server settings or configuration files on the server?
Do you have any suggestions?

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans