0

I am new to WCF. I have a WCF service which contain a method to save image. Calling this method from mobile app and passing image as base64 format (ImageString). The length of ImageString in mobile 251458, while receive in WCF, ImageString truncate to 32767.

public class ImageUpload : Response
{
    [DataMember]
    public int Id { get; set; }

    [DataMember]
    public string ImageString { get; set; }

    [DataMember]
    public int ImageCategory { get; set; }  
}

<bindings>
  <basicHttpBinding>
    <binding name="soap" openTimeout="10:30:00" sendTimeout="10:30:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/>
  </basicHttpBinding>
  <webHttpBinding>
    <binding name="myWebHttpBinding" closeTimeout="10:30:00" openTimeout="10:30:00" receiveTimeout="10:30:00" sendTimeout="00:30:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>
  </webHttpBinding>
</bindings>

Let me know, what the mistake am doing. Thanks in advance

user792223
  • 61
  • 3
  • 8
  • post your WCF client and server bindings – Dhawalk Apr 15 '14 at 14:03
  • 1
    Dhawalk has a good point. It could be the client, or the server that is cutting the call. It looks like most settings are maxed out on one. Has something been missed in the other? It might be worth trying the settings from this http://stackoverflow.com/questions/884235/wcf-how-to-increase-message-size-quota or this - http://stackoverflow.com/questions/8225736/transfer-large-amount-of-data-in-wcf-service or this - http://stackoverflow.com/questions/14479885/wcf-streaming-large-data-500mb-1gb-on-a-self-hosted-service and seeing if they work. – JsAndDotNet Apr 15 '14 at 14:14

0 Answers0