Asp.net Encryption Key Generator
Asp.net Encryption Key Generator Software
AES Encryption (Machine Key) not validating user on IIS
Jul 14, 2017 12:05 PMRohit RaoLINK
Hi,
I am using Asp.net membership in my application. /sap-solution-manager-key-generator.html. We were using SHA256 for validation and 3DES for decryption (Asp.net membership) in machine key in Web.config.
Now my requirement is to use AES encryption for both. I created Keys from IIS and added in my Web.config.
<machineKey validationKey='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,IsolateApps' decryptionKey='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,IsolateApps' decryption='AES' validation='AES'/>
Using That configuration setting, i updated password of 1 of my user in development environment.
MembershipUser mu = Membership.GetUser('UserName');
mu.ChangePassword(mu.ResetPassword(), 'Password');
After that i ran the application to test my password on development machine using below code & it was returning true:
bool b = Membership.ValidateUser('UserName', 'Password');
But when i published the website on IIS on my local machine, It is returning FALSE.
I am not sure why it is happening as the same keys are used at both places.
Thanks
Where To Find Encryption Key
Rohit