Loading ...

FormAuthentication: Unable to validate data | CodeAsp.Net

FormAuthentication: Unable to validate data

 /5
0 (0votes)

I saw a user on forums asking a question regarding "Unable to validate data" issue while doing FormAuthentication.Decrypt. He was doing FormsAuthentication.Encrypt on one application and FormAuthentication.Decrypt on other application. These two applications were entirely different applications having separate web.config files. 

Issue: 
 "Unable to validate data" 

Reason:
FormsAuthentication.Encrypt and Decrypt methods use the machine key to do the encryption/decryption process. The issue here was that the machine keys for two applications for that user was different. 

Fix:
Machine key should be same at the time of encryption and decryprtion. The fix was to use the same machine keys for those two applications.

Comments (no comments yet)

Top Posts