When I try to call a WCF service I am getting the following message \"An error occurred when verifying security for the message.\"
When I remove the custom authenica
I was getting the same error on my IIS 7.5 server. I forgot to add Read permission on the certificate's private key to the app pool virtual account (e.g. IIS AppPool\ASP.NET v4.0).
For info, whilst testing various combinations of accounts and permissions, I noticed that the app pool needed to be recycled to lose access to the key, once it had been retrieved once.
(0x80131501 - An error occurred when verifying security for the message.)