2

Hi I recently upgraded my WPF client and WCF services from .Net 3.5 to .Net 4.0. After the upgrade I started getting following error when using KerberosOverTransport:

An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

Here's my client side Binding

  <binding name="StreamingBinding_Kerberos">
      <gzipMessageEncoding innerMessageEncoding="textMessageEncoding"
                           maxArrayLength="2147483647" />
      <security authenticationMode="KerberosOverTransport"/>
      <httpsTransport transferMode="StreamedResponse"
                      maxReceivedMessageSize="536870912"
                      authenticationScheme="Anonymous" />
    </binding>

Here's the endpoint I am using: I am returning a Stream from TestService method. All this was working fine with .Net 3.5 but as soon as we upgraded to .Net 4.0 all this stopped working. We have another binding using UsernameOverTransport which works without any issues even after.Net 4.0 upgrade.

  <binding name="StreamingBinding_Username">
      <gzipMessageEncoding innerMessageEncoding="textMessageEncoding"
                           maxArrayLength="2147483647" />
      <security authenticationMode="UserNameOverTransport"/>
      <httpsTransport transferMode="StreamedResponse"
                      maxReceivedMessageSize="536870912"
                      authenticationScheme="Anonymous" />
    </binding>

Please help!

Gaurave Sehgal
  • 119
  • 3
  • 11
  • Is tracing enabled? Is it possible that there's an issue with the authentication or perhaps the service is throwing an error somewhere? – Tim Nov 03 '11 at 04:46
  • Yes, tracing is enabled both on client and server but it shows every thing as normal. Network packet trace on server shows that it is sending an RST signal back to the client. – Gaurave Sehgal Nov 04 '11 at 20:26

1 Answers1

0

If you are hosting via IIS, make sure the .NET Framework Version property on your Application Pool is set to v4.0.

UnhandledExcepSean
  • 12,504
  • 2
  • 35
  • 51