We are receiving a variety of errors when our net.tcp connections are load balanced in the Azure cloud. The errors include:
An unsecured or incorrectly secured fault was received from the other party
The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted
The communication object, System.ServiceModel.Channels.SslStreamSecurityUpgradeProvider, cannot be used for communication because it has been Aborted.
The errors occur when our client application performs many concurrent requests. The number of requests increases the number of connections to the service and when any of them target a different server it fails.
I understand that we need to turn off sessions, or at least use stateful session tokens, but I'm at a loss as to how to do this. I've tried setting requireSecurityContextCancellation to false and this works in the DevFabric but does not seem to work in the
cloud. Perhaps because the cloud service does not run under an account with a user profile.
I've listed the binding we are using below. Sorry it is in so much detail, but we have had to tweak a number of settings to get things running reliably on-premise. We also use a second binding with the same settings except "transferMode=Streamed".
Can anyone please let me know what I need to change in this binding to get it to work reliably behind the Azure load balancers?
I don't believe this is an issue related to connections being closed, therefore keep-alive will not help.
The observations I've made show that the original connection is still active and when a number of requests are made from the client concurrently, the number of connections increases. It is at this point that the calls can fail.