views:

33

answers:

0

Hi,

I have WCF service that uses wsHttpBinding and authentication with certificate.

I run this service on multiple machines and my firewall routes the request to the different servers.

The problem is when the client open proxy and works with one server and on the next call the firewall routes the request to another server I get an exception on the client:

An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

With inner Exception:

The message could not be processed. This is most likely because the action 'http://www.site.com/api/contract/IService/DoAction' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

Is there any solution?

ANSWER:

Found the solution - Use : establishSecurityContext="false"

  <security mode="Message">            
    <message clientCredentialType="Certificate" negotiateServiceCredential="false"
      algorithmSuite="Default" establishSecurityContext="false" />
  </security>