I have periodically ran into the following exception on my CRM 2011 virtual dev machine:
System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: An error occurred when verifying security for the message.
I have found ways to work around this now every time I have ran into it.
I have noticed another Exception with the same cause before when working with the CrmSvcUtil.exe tool.
Cause: Timezone or time being wrong on the client or server.
Resolution: Correct date and time settings on affected machine, also restart client application making call
Example Post Illustrating: http://social.msdn.microsoft.com/Forums/is/wcf/thread/d7a13c9b-2144-4b0d-9585-5a487126ab1f
I had to restart Visual Studio on the client machine after I fixed the time on the server for my calls to function properly.
I hope this helps!
Thanks! This helped me out a lot. I was getting this error from custom WCF services being called between two Microsoft CRM servers.
ReplyDeleteSOAP security negotiation with 'http://localhost:5555/crm2/XRMServices/2011/Organization.svc' for target 'http://localhost:5555/crm2/XRMServices/2011/Organization.svc' failed. See inner exception for more details.
This error didn't happen at first and then would happen only some of the time and then all of the time. The two CRM servers were both VM images, hosted on different boxes.
I sync'd the system time on the two boxes with the domain controller and the problem went away. This saved me a lot of headache. Thanks!!
glenn.
I am glad you found this helpful. The WCF bindings only allow a 5 minute maximum discrepancy when you convert the time to GMT or Zulu time based on TimeZone settings.
ReplyDeleteI have also seen where you can fall an hour off as a result of not having the setting for the auto-adjust for daylight savings time be the same for your client and server.
It can get pretty annoying. Not all WCF bindings have this discrepancy, but the ones for the WCF endpoints in CRM 2011 do.
i got the same issue BUT i have to deal with crm 2011 online. so i dont have access to the timesetting of the crm-server. i allready changed the timezone of my biztalk but no effect.
ReplyDeleteany other ideas?
greetz Claus
You will need to find out the setting information so you can make sure you are in sync with the server.
ReplyDeleteThank you!!
ReplyDeleteIn my case, I had to synchronize the timeSettings in the machineDomain controller and the CRM server (the WCF service is hosted in the CRM server)
Thank you again
Thanks so much!!
ReplyDeleteWe are really trust on the online crm software where we can take a look of our enployee There are important sales lead follow up ideas which all be helpful and there you can get the chance to learn and implement the web based crm software in bets of ways. There are many cases when the CRM tool
ReplyDelete