none
WCF - Request Entity Too Large RRS feed

  • Question

  • HI,

    This is Deepak Suryawanshi, I am facing problem while receiving image in WSDL (WCF) Service. have hosted for private domain, One of my client is sending data along with Image(Binary) through web service. I am able to get the Normal data but could not get Image. i have done all the setting as per various blog. still problem persist. 

    Required help to resolve the issue on urgent basis. Call me on 09325075430 or drop mail dsuryawanshi@mdindia.com

    Thanks

    DS

    Wednesday, July 16, 2014 6:15 AM

Answers

  • Wednesday, July 16, 2014 6:56 AM
  • Hi,

    In WCF Service by default the data can be transfered is 64kb, then it seems that your image size is larger than it. So please try to configure the binding to increase the maxBufferSize and timeout and so on as following:

      <basicHttpBinding>
                <binding name="BasicHttpBindingConfig" closeTimeout="00:20:00"
                    openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None"/>
                </binding>
         </basicHttpBinding>

    Then please do not forget to apply this binding configuration to the endpoint as following:
    <endpoint address="" binding="basicHttpBinding" 
    bindingConfiguration="BasicHttpBindingConfig"  
    contract="*****" />

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 17, 2014 2:51 AM
    Moderator

All replies

  • Wednesday, July 16, 2014 6:56 AM
  • Hi,

    In WCF Service by default the data can be transfered is 64kb, then it seems that your image size is larger than it. So please try to configure the binding to increase the maxBufferSize and timeout and so on as following:

      <basicHttpBinding>
                <binding name="BasicHttpBindingConfig" closeTimeout="00:20:00"
                    openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None"/>
                </binding>
         </basicHttpBinding>

    Then please do not forget to apply this binding configuration to the endpoint as following:
    <endpoint address="" binding="basicHttpBinding" 
    bindingConfiguration="BasicHttpBindingConfig"  
    contract="*****" />

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 17, 2014 2:51 AM
    Moderator