Fix for Error Accessing Remote Endpoint Address

The Windows networking team has released a fix for accessing the remote endpoint address of a socket that may affect WCF users. When an asynchronous call is made to a thread working with the socket, and the thread exits before the asynchronous call is processed, the wrong remote endpoint address might be returned.

WCF users could hit this bug causing the remote endpoint address for a TCP channel to not be available. A symptom that indicates you're having this particular problem is an occasional first chance exception where the top of the stack trace has these frames:

 System.Net.IPEndPoint.Create(System.Net.SocketAddress)
System.Net.Sockets.Socket.get_RemoteEndPoint()
System.ServiceModel.Channels.SocketConnection.get_RemoteIPEndPoint()

The exception is often that the IPEndPoint has an invalid AddressFamily or another error that the constructed address is not valid.

You can get the fix from KB article 973155.