Suppose you have a silverlight application having a DropDownlist which would display 1/2 million names of a Type,say Person.
Your Wcf application is having a service contact that you pass 1/2 a million Types to the SilverLight application, eg: List
List
So you have a list containing 1/2 a million objects of Type and each having the details of TYpe.
The web.Config of the WCF Service Application should have BindingConfiguration and that configuration should possess these properties transferMode="Streamed",maxBufferSize="65536",maxReceivedMessageSize="204003200"'.
Here the Streamed transfer mode would help us to transit Bulk Typed Objects from WCF Service.
<'system.serviceModel'>
<'behaviors'>
<'serviceBehaviors'>
<'behavior name="ServiceBehavior1"'>
<'serviceMetadata httpGetEnabled="true"' />
<'serviceDebug includeExceptionDetailInFaults="false"' />
<'/behavior'>
<'/serviceBehaviors'>
<'/behaviors'>
<'services'>
<'service behaviorConfiguration="ServiceBehavior1" name="PersonInfo"'>
<'endpoint address="" binding="basicHttpBinding" bindingConfiguration="StreamBinding"
contract="IPersonInfo"'>
<'identity'>
<'dns value="localhost"' />
<'/identity'>
<'/endpoint'>
<'endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"' />
<'/service'>
<'/services'>
<'bindings'>
<'basicHttpBinding'>
<'binding name="StreamBinding"
transferMode="Streamed"
maxBufferSize="65536"
maxReceivedMessageSize="204003200"' />
'basicHttpBinding'>
'bindings'>
No comments:
Post a Comment