SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using FBA with SqlMembership Provider in sharepoint 2010 and its not working if i set passwordFormat="Encrypted" in all web.configs(web,central,STS) and here is error from ULS Password check on 'cratledge' generated exception: 'System.Configuration.Provider.ProviderException: You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
at System.Web.Security.MembershipProvider.EncryptPassword(Byte[] password)
at System.Web.Security.MembershipProvider.EncodePassword(String pass, Int32 passwordFormat, String salt)
at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)
at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password)
at Microsoft.SharePoint.IdentityModel.SPFormsUserNameSecurityTokenHandler.ValidateToken(SecurityToken token)'.

Now if i change PasswordFormat from 2(Encrypted) to 0(Clear) then its working.

please advise on this issue

Thanks ROnak

share|improve this question
up vote 1 down vote accepted

The issue is what the error states: You need to specify the key that is used to encrypt/decrypt the password in machineKey section of the web.config. There is more information here:

Don't forget to make these changes to all web.config files (STS, Central Admin + Web Applications)

I would recommend using the value "Hashed" instead, which does not need this key and is actually more secure than "Encrypted" - as Encrypted passwords can be decrypted while Hashed passwords cannot.

share|improve this answer
Thanks Chris.just solved the issue and did same thing you mention in your comment. – Ronak Jan 16 '13 at 15:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.