2

We have an application that is using a http binding that has this configuration on the client side:

    <binding name="SecureStreamedHttpBinding"
             transferMode="Streamed"
             maxReceivedMessageSize="8000000000"
             maxBufferSize="65536"
             sendTimeout="00:20:00">
      <security mode="Transport">
        <transport clientCredentialType="None" />
      </security>
    </binding>

And this configuration on the server side:

    <binding name="SecureStreamedHttpBinding_IHub"
             transferMode="Streamed"
             maxReceivedMessageSize="8000000000"
             maxBufferSize="65536"
             receiveTimeout="00:20:00">
      <security mode="Transport">
        <transport clientCredentialType="None"/>
      </security>
    </binding>

The channel is being open by the client by creating a ChannelFactory and then calling CreateChannel:

               ChannelFactory<IHub> channelFactory = new ChannelFactory<IHub>(endpointConfigurationName);
           IHub hub = channelFactory.CreateChannel();
           ((IClientChannel)hub).Open();

Sometimes when we try to transfer large files over this connection we get an error from the server that says: "The remote server returned an unexpected response: (413) Request Entity Too Large." I say sometimes because there seems to be a number of timing/speed factors that can cause the error to come and go. For instance errors seem more prevalent on machines with high bandwidth. They seem to be less prevalent when started well after the connection is established. The effects of timing/speed are inconsistent however.

If TLS is turned off we never have any issues.

We have Wire Sharked the connection and found that the client is sending a "FIN" message on the port at approximately the same time of the error, but we don't know exactly when the 413 error occurs because we don't see it in Wire Shark. So, we don't know if this is cause or effect.

We have also reviewed the Failed Request Tracing information from IIS and found the "Request Entity Too Large" listed along with the data that was being transferred at that time, but we are unsure how to interpret what we see.

We don't know why the client is issuing the FIN? Is that normal? Is it the cause of the "Request Entity Too Large" error on the server, or the other way around. Or just coincidence? Either way the effect is that we have to restart the file transfer at that point. Any thought on what might be the root cause of the error?

Thanks in advance for your help.

4

1 に答える 1