none
Rest wcf service, with json more then 260length RRS feed

  • Question

  • .Hello,

    i got a rest service with function echo, which take string as parameter. When i mark it as Get method and in my client create uri with parameter(which is long json object, more then 260 chars) i got bad request. For less then 260 chars it works. How can i make it work for long data? I mean can i make it post with stream so i can recive data from function too? All config parameters (maxBufferSize, maxRecivedDataSize ...) doesnt work?

    Sunday, September 1, 2013 2:32 PM

Answers

  • Hi,

    You said that you have increase the maxBufferSize, maxRecivedDataSize. Have you tried to increase the readerQuotas as well? Please try to add the following to your web configure file:

     <binding name="ApiQuotaBinding" 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="None" />
            </binding>
          </webHttpBinding>
        </bindings>

    If you still can not solve your problem, please try to post your web configure file here.

    Also try to enable the wcf tracing to find the casue:
    #How to enable the wcf tracing:
    http://msdn.microsoft.com/en-us/library/ms733025.aspx .

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 2, 2013 7:55 AM
    Moderator