Strange WCF net.tcp exception

I have a WCF client / service with net.tcp transport. When I turn on WCF trace on the client side, I see the following errors in the trace (see. Screenshot from viewing the trace of the service). It is strange that WCF processes and repairs this error, and my client does not receive any exceptions and continues to work. This exception occurs randomly, randomly, but not every time the web method is called. Client Authentication (Windows XP) is windows, the service is identified by SPN, services are self-service on the Windows service for NLB (Windows Server 2003). Can someone explain to me what is going on here.

The exception to stacktrace from xml tracing is:

<ExceptionString> System.ServiceModel.Security.MessageSecurityException: The server rejected the upgrade request. ---&gt; System.ServiceModel.ProtocolException: Error while reading message framing format at position 0 of stream (state: ReadingUpgradeRecord) ---&gt; System.IO.InvalidDataException: More data was expected, but EOF was reached. --- End of inner exception stack trace --- --- End of inner exception stack trace --- </ExceptionString> 

Screen shot :

+7
tcp wcf wcf-security
source share
1 answer

Not sure what could be the real issue, and if it is connected with streaming (I will dive). In either case, you can try to catch a server-side exception and throw a CommunicationException instead.

 catch (Exception ex) { throw new CommunicationException(ex.Message, ex); } 

Thus, the client proxy should not ignore the exception, and its state should be "Faulted".

-3
source share

All Articles