"An error occurred when verifying security for the message." when executing .SaveChanges()
Hi,
I have just came across this exception when trying to execute the SaveChanges() method of my ServiceContext object in CRM 2011 (on-premise).
Exception:
"An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail."
Inner Exception:
"An error occurred when verifying security for the message."
Unfortunately I couldn’t find so much useful information around about the InnerException, which I guess should be the first thing to search for. But, I did could find related info about the main Exception and realized that I was also having troubles to connect from my CRM Outlook client too. So, I suspected that it was something wrong with my machine but not the code, the code was right.
And that was true. The problem was my clock. As I have changed my time zone, time was not in synch with my CRM 2011 server.
Solution:
In my case, I just set up same time zone in my machine as the server is set up, adjusted the clock, F5 again and voila! SaveChanges() worked like a charm
Hope it helps to save somebody else’s time,
PP [twitter: @pabloperalta]
UruIT Dynamix | Excellence in Dynamics CRM Nearshoring Services.