locked
WCF WebService throws client side exception while sending data RRS feed

  • Question

  • Hi

    this is my config file info.. 

    <span><span><span>  <bindings>
          <wsHttpBinding>
            <binding name="WSHttpBinding_IService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                  maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                  enabled="false" />
              <security mode="Message">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                    realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true"
                    algorithmSuite="Default" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings></span></span></span>
    

     

    when i send data of bytes 87015 it throws {"The remote server returned an unexpected response: (400) Bad Request."} ..

     

    Is there any limit for maxReceivedMessageSize ??


    Kumar SDK
    Tuesday, September 27, 2011 10:13 AM

Answers

  • Hi Kumar,

    Please refer the following post, it seems that your issue is related to the issue mentioned in this post. 

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/521c6165-7900-4bdb-ba2e-b69c02388101/#02ba5b9b-2ad4-4836-b148-64a2eb97afbd 

    The issue doesn't seems to be related to the size limit, because the size limit for maxReceivedMessageSize is Int64.MaxValue.

    Thanks,
    Umesh 

    • Marked as answer by Yi-Lun Luo Tuesday, October 4, 2011 4:44 AM
    Tuesday, September 27, 2011 11:15 AM
  • On 9/27/2011 6:13 AM, Kumar SDK wrote:
    > Hi
    >
    > this is my config file info..
    >
    > <span><span><span>   <bindings>
    >        <wsHttpBinding>
    >          <binding  name="WSHttpBinding_IService"  closeTimeout="00:01:00"
    >              openTimeout="00:01:00"  receiveTimeout="00:10:00"  sendTimeout="00:01:00"
    >              bypassProxyOnLocal="false"  transactionFlow="false"  hostNameComparisonMode="StrongWildcard"
    >              maxBufferPoolSize="2147483647"  maxReceivedMessageSize="2147483647"
    >              messageEncoding="Text"  textEncoding="utf-8"  useDefaultWebProxy="true"
    >              allowCookies="false">
    >            <readerQuotas  maxDepth="2147483647"  maxStringContentLength="2147483647"  maxArrayLength="2147483647"
    >                maxBytesPerRead="2147483647"  maxNameTableCharCount="2147483647"  />
    >            <reliableSession  ordered="true"  inactivityTimeout="00:10:00"
    >                enabled="false"  />
    >            <security  mode="Message">
    >              <transport clientCredentialType="Windows"  proxyCredentialType="None"
    >                  realm=""  />
    >              <message  clientCredentialType="Windows"  negotiateServiceCredential="true"
    >                  algorithmSuite="Default"  />
    >            </security>
    >          </binding>
    >        </wsHttpBinding>
    >      </bindings></span></span></span>
    >
    > when i send data of bytes 87015 it throws {"The remote server returned
    > an unexpected response: (400) Bad Request."} ..
    >
    > Is there any limit for maxReceivedMessageSize ??
    >
      maxReceivedMessageSize="2, 247,483,647" is 2 billion something and is
     > 87, 015  so that's not your problem.
     400 Bad Request
     
    The request could not be understood by the server due to malformed syntax.
     
    You could look at the IIS logs to see if you get more information.
     The service side config should match on numbers being set on client-side
    as far as setting max settings.
     
    • Marked as answer by Yi-Lun Luo Tuesday, October 4, 2011 4:44 AM
    Tuesday, September 27, 2011 11:21 AM
  • Check whether the contract is updated at the client side too and verify the config file too.
    • Marked as answer by Yi-Lun Luo Tuesday, October 4, 2011 4:44 AM
    Tuesday, September 27, 2011 1:54 PM

All replies

  • Hi Kumar,

    Please refer the following post, it seems that your issue is related to the issue mentioned in this post. 

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/521c6165-7900-4bdb-ba2e-b69c02388101/#02ba5b9b-2ad4-4836-b148-64a2eb97afbd 

    The issue doesn't seems to be related to the size limit, because the size limit for maxReceivedMessageSize is Int64.MaxValue.

    Thanks,
    Umesh 

    • Marked as answer by Yi-Lun Luo Tuesday, October 4, 2011 4:44 AM
    Tuesday, September 27, 2011 11:15 AM
  • On 9/27/2011 6:13 AM, Kumar SDK wrote:
    > Hi
    >
    > this is my config file info..
    >
    > <span><span><span>   <bindings>
    >        <wsHttpBinding>
    >          <binding  name="WSHttpBinding_IService"  closeTimeout="00:01:00"
    >              openTimeout="00:01:00"  receiveTimeout="00:10:00"  sendTimeout="00:01:00"
    >              bypassProxyOnLocal="false"  transactionFlow="false"  hostNameComparisonMode="StrongWildcard"
    >              maxBufferPoolSize="2147483647"  maxReceivedMessageSize="2147483647"
    >              messageEncoding="Text"  textEncoding="utf-8"  useDefaultWebProxy="true"
    >              allowCookies="false">
    >            <readerQuotas  maxDepth="2147483647"  maxStringContentLength="2147483647"  maxArrayLength="2147483647"
    >                maxBytesPerRead="2147483647"  maxNameTableCharCount="2147483647"  />
    >            <reliableSession  ordered="true"  inactivityTimeout="00:10:00"
    >                enabled="false"  />
    >            <security  mode="Message">
    >              <transport clientCredentialType="Windows"  proxyCredentialType="None"
    >                  realm=""  />
    >              <message  clientCredentialType="Windows"  negotiateServiceCredential="true"
    >                  algorithmSuite="Default"  />
    >            </security>
    >          </binding>
    >        </wsHttpBinding>
    >      </bindings></span></span></span>
    >
    > when i send data of bytes 87015 it throws {"The remote server returned
    > an unexpected response: (400) Bad Request."} ..
    >
    > Is there any limit for maxReceivedMessageSize ??
    >
      maxReceivedMessageSize="2, 247,483,647" is 2 billion something and is
     > 87, 015  so that's not your problem.
     400 Bad Request
     
    The request could not be understood by the server due to malformed syntax.
     
    You could look at the IIS logs to see if you get more information.
     The service side config should match on numbers being set on client-side
    as far as setting max settings.
     
    • Marked as answer by Yi-Lun Luo Tuesday, October 4, 2011 4:44 AM
    Tuesday, September 27, 2011 11:21 AM
  • Check whether the contract is updated at the client side too and verify the config file too.
    • Marked as answer by Yi-Lun Luo Tuesday, October 4, 2011 4:44 AM
    Tuesday, September 27, 2011 1:54 PM