Length of the error returned by a web Service

0

When I consume a Web service, I receive this error:

  • The first 1024 bytes of the response were ....

Those 1024 characters are part of an html page that the server is returning. It covers the part of the <head> and the beginning of <body> but does not reach the end of the whole (should end in </html> )

The server has to be returning a more extensive response (the entire web page) so if I only receive 1024 characters, the code that captures the response to see the error is truncated.

Can you increase that size?

    
asked by Jaime Capilla 14.02.2017 в 11:51
source

3 answers

1

I do not know if it is a WCF service or not. Nor what version of framework are you using, but here I pass some possible solutions to your problem:

  • Control Panel > Internet options > Connections > LAN configuration > Advanced > Proxy Configuration . If you use proxy, you can place your IP address as an exception. If you do not use you must check the option "Automatically detect settings".
  • In your web.config file of the service modify your xml in the following way:

    < system.web >
        ...
        < sessionState cookieless="UseCookies" / >     

  • answered by 14.02.2017 в 14:43
    0

    Edit the httpd.conf configuration file and add this line:

    LimitRequestLine 99999
    

    And restart the Apache server, if this is the case

    It worked for me when a web service did not receive a certain size of values, because the default configuration does not carry large data sizes

        
    answered by 14.02.2017 в 20:28
    0

    Did you try this?

      <system.web>
                <httpRuntime executionTimeout="500" maxRequestLength="29296" />
              </system.web>
    
        
    answered by 09.08.2018 в 17:36