locked
how to transfer large amount of data from wcf service to client using collection in efficient manner RRS feed

Answers

  • Monday, February 10, 2014 6:54 PM
  • Hi,

    By default the size of data can be transfer from the wcf service to the client is 64kb, so if you want to transfer a large data, you should do some configuration, for example increasing the maxReceivedMessageSize and timeout value. For more information, please try to check the following:

    <binding name="BasicHttpBinding_IService" closeTimeout="04:01:00"
         openTimeout="04:01:00" receiveTimeout="04:10:00" sendTimeout="04:01:00"
         allowCookies="false" bypassProxyOnLocal="false" 
         hostNameComparisonMode="StrongWildcard"
         maxBufferSize="2147483647" maxBufferPoolSize="2147483647" 
         maxReceivedMessageSize="2147483647"
         messageEncoding="Text" textEncoding="utf-8" 
         transferMode="Streamed"
         useDefaultWebProxy="true">
      <readerQuotas maxDepth="128" 
          maxStringContentLength="2147483647" maxArrayLength="2147483647"
          maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>

    Also please do not forget to apply the above binding configuration to the endpoint:

    <endpoint address="" binding="basicHttpBinding" 
              bindingConfiguration="BasicHttpBinding_IService" 
              contract ="IService">
    </endpoint>

    For more information, please try to refer to the following articles:
    #WCF Streaming: Upload/Download Files Over HTTP:
    http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP .

    #Transferring large files using WCF:
    http://garfoot.com/blog/2008/06/transferring-large-files-using-wcf/ .

    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.

    Tuesday, February 11, 2014 2:45 AM

All replies

  • Monday, February 10, 2014 6:54 PM
  • Hi,

    By default the size of data can be transfer from the wcf service to the client is 64kb, so if you want to transfer a large data, you should do some configuration, for example increasing the maxReceivedMessageSize and timeout value. For more information, please try to check the following:

    <binding name="BasicHttpBinding_IService" closeTimeout="04:01:00"
         openTimeout="04:01:00" receiveTimeout="04:10:00" sendTimeout="04:01:00"
         allowCookies="false" bypassProxyOnLocal="false" 
         hostNameComparisonMode="StrongWildcard"
         maxBufferSize="2147483647" maxBufferPoolSize="2147483647" 
         maxReceivedMessageSize="2147483647"
         messageEncoding="Text" textEncoding="utf-8" 
         transferMode="Streamed"
         useDefaultWebProxy="true">
      <readerQuotas maxDepth="128" 
          maxStringContentLength="2147483647" maxArrayLength="2147483647"
          maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>

    Also please do not forget to apply the above binding configuration to the endpoint:

    <endpoint address="" binding="basicHttpBinding" 
              bindingConfiguration="BasicHttpBinding_IService" 
              contract ="IService">
    </endpoint>

    For more information, please try to refer to the following articles:
    #WCF Streaming: Upload/Download Files Over HTTP:
    http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP .

    #Transferring large files using WCF:
    http://garfoot.com/blog/2008/06/transferring-large-files-using-wcf/ .

    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.

    Tuesday, February 11, 2014 2:45 AM