3

I have a very strange problem when using streaming mode in wcf. Here are my server and client configurations.

Server config:

<system.serviceModel>
    <services>
      <service name="eTreasury.ServiceModel.ServiceImplimentation.BackOfficeService" 
               behaviorConfiguration="ServiceBehavior">
        <endpoint name="streamed"
                  address="/streamed"
                  binding="customBinding"
                  bindingConfiguration="BinaryHttpBindingStreamedConfig"
                  contract="eTreasury.ServiceModel.ServiceContracts.IBackOfficeService"
                  behaviorConfiguration="EndpointBehavior"/>
      </service>
    </services>
    <bindings>
      <customBinding>
        <binding name="BinaryHttpBindingStreamedConfig"
                 openTimeout="00:02:00"
                 receiveTimeout="00:02:00"
                 sendTimeout="00:02:00"
                 closeTimeout="00:02:00">
          <binaryMessageEncoding maxReadPoolSize="2147483647"
                                 maxWritePoolSize="2147483647"
                                 maxSessionSize="2147483647">
            <readerQuotas maxArrayLength="2147483647"
                          maxDepth="1024"
                          maxBytesPerRead="2147483647"
                          maxNameTableCharCount="2147483647"
                          maxStringContentLength="2147483647"/>
          </binaryMessageEncoding>
          <httpTransport maxBufferPoolSize="2147483647"
                          maxBufferSize="2147483647"
                          maxReceivedMessageSize="2147483647"
                          transferMode="StreamedResponse"/>
        </binding>
      </customBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="ClientBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
</system.serviceModel>

Client config:

<system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="BinaryHttpBindingStreamedConfig" closeTimeout="00:05:00"
          openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00">
          <binaryMessageEncoding />
          <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"
            transferMode="StreamedResponse" />
        </binding>
      </customBinding>
    </bindings>
<client>
      <endpoint address="http://localhost:2408/BackOfficeService.svc/streamed"
        binding="customBinding" bindingConfiguration="BinaryHttpBindingStreamedConfig" contract="BackOfficeServiceClient.IBackOfficeService"
        name="BackOfficeStreamedService" />
      </client>
   </system.serviceModel>

Everything is fine in Google Chrome, Firefox, Opera on 200Mb data. Problem only occurs in Internet Explorer.

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:LoadOrdersResult. The InnerException message was 'There was an error deserializing the object of type System.Collections.ObjectModel.ObservableCollection`1[[eTreasury.DataModel.BusinessObjects.OrderListItemForBack, eTreasury.SilverlightDataModel, Version=1.0.0.19815, Culture=neutral, PublicKeyToken=null]]. Unexpected end of file. Following elements are not closed: CreatedDate, OrderListItemForBack, LoadOrdersResult, LoadOrdersResponse, Body, Envelope.'. Please see InnerException for more details

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Giorgi Nakeuri
  • 35,155
  • 8
  • 47
  • 75

0 Answers0