Error retrieving password
-
Hi, I have an application in which I am trying to retrieve a user's password. The code is as follows:- 1 MembershipUser resetPass = MyUsers[UserInfo.Rows[e.NewSelectedIndex].Cells[0].Text]; 2 string password = resetPass.GetPassword(); However on execution I am hit with the following error:- This Membership Provider has not been configured to support password retrieval. I have tried the following steps to resolve this issue but to no avail:- In the WebConfig in I have modified the <Membership></Membership> tag to reflect the following:- <membership> <providers> <clear/> <add name=”AspNetSqlMembershipProvider” connectionStringName=”247Db” minRequiredPasswordLength=”4″ minRequiredNonalphanumericCharacters=”0″ type=”System.Web.Security.SqlMembershipProvider” applicationName=”/247App” enablePasswordRetrieval=”true” requiresQuestionAndAnswer=”false” passwordFormat=”Encrypted” requiresUniqueEmail=”false” /> </providers> </membership> I also added a machineKey to support the setup above as follows:- 1 <machineKey validationKey="11D7D8362528F04266ACACDDEA7..." 2 decryptionKey=”4C0…” 3 validation=”SHA1″/> However, now i get the following error:- "Hashed passwords cannot be encoded". I am guessing this is because the passwordFormat property in the web.config was "Hashed" befrore I changed it to Encrypted. Nevertheless, what should I do ? Thanks