I am unable to transfer huge data say 120 MB of stream from client to wcf service.
I am facing this error "stream.length threw an exception of type System.NotSupportedException" at service end.
How do I use the concept of chunking with single service call that transfer entire data from client to server.
Its very urgent and Thanks in advance for the solution
Loading
Raaj KumarPosted Feb 17, 2010, 3:49 AM
You have to make some change in web.config. You need to add
<bindings>
<basicHttpBinding>
<binding name="DataStreamServiceBehaviorBinding"
transferMode="StreamedResponse"
maxBufferSize="65536"
maxReceivedMessageSize="125829120"> // 120*1024*1024 Bytes
binding>
<service behaviorConfiguration="ClientConfigTest.Web.Services.DataStreamServiceBehavior"
name="ClientConfigTest.Web.Services.DataStreamService">
<endpoint address=""
binding="basicHttpBinding" //Make sure that this is changed to basicHttpBinding
bindingConfiguration="DataStreamServiceBehaviorBinding" //Name of the binding
contract="ClientConfigTest.Web.Services.IDataStreamService">
<identity>
<dns value="localhost" />
identity>
endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
service>
services>
basicHttpBinding>
bindings>
Hope this will solve your problem. Please let me know you have any problem.If you want to know about this just have a look at this site,
http://msdn.microsoft.com/en-us/library/ms733742.aspx
Thanks,
Raaj
--------------------------------------------------------------------------------
Please mark as Answer if it resolves your problem