MessageSecurityException

Oct 7, 2009 at 3:28 PM

I am trying to run the Mutual Certification example but I keep getting this exception (MessageSecurityException) when I try to contact the service from the mobile client.

Both the server and the client start normally. I haven't made any change at all in the the the files. I have changed the hosts file as required.

However when I am using the console test client everythings runs smoothly so I assume that I have access to the service via the mobilewcf.com domain and that I have inserted all the certifications properly. I am connecting to the emulator using Windows Mobile Device Center and I have network access. I am running windows 7 although I don't think that has anything to do with the exception. 

I used findprivatekey.exe and gave to the mobilewcf.com private key full control to the network service users even though I self host the service and it's not necessary.

Is there any other action that I should take?

 

Oct 15, 2009 at 1:21 PM

Problem solved.

As it turned out the server and the client had different time zones.

Once I fixed that it worked perfectly

Coordinator
Nov 24, 2009 at 4:35 PM

Glad you resolved this one! Thanks for posting, it might help others.

Apr 5, 2011 at 2:10 PM
Edited Apr 5, 2011 at 2:11 PM

I have got the same problem, after calling the wcf service on the mobile device (or emulator) I got a popup box "MessageSecurityException" nothing more nothing less.

-Certificates are installed aswell on the desktop as on the mobile device. (installed on desktop with an user in local admin group)

-End Piont is accessable (host file is modified)

-Example without certification works well

-Time zones are equal

-Date/time on both devices are the same.

What else can I check?

Thank you helping me out.

Bart