Some times back, I wrote an application with a CRM 2011 login module. The module I used to connect with CRM 2011 Online and On-Premise versions.
When I released the application number of users had the problem connecting and receiving error as below:
There is an error in XML document (5, 5)
System.Security.Cryptography.CryptographicException: The parameter is incorrect
Here are the steps to resolve it:
1. Go to path: C:\Users<current user>\LiveDeviceID\
2. Delete the LiveDevice.xml
3. Try to connect from the application.
4. If this doesn’t solve the error, follow steps 1 and 2, reboot and try connecting from the application.
This should solve the problem.