How to enable password retrieval in Asp.Net - Asp.Net Articles.



In this article i will tell you how to enable password retrieval in Asp.Net.


In the Previous articles i explained Get Selected RadioButton Value of RadioButtonList using C# and ASP.Nethow to create serial no. column in gridview using, Add check boxes column in DataGridView for deleting records from databasewhat is query string and how to use it in asp.nethow to retrieve logged in user password using and many more about ASP.Net.

If EnablePasswordRetrieval is set to false in web .config, the underlying membership provider may throw a HttpException.

The providers that are included with the .NET Framework support multiple password formats to enhance password security. If the password format is set to Hashed, then users will not be able to retrieve their existing password from the database. The Hashed password format provides one-way encoding of password values. Passwords are "hashed" and compared to values stored in the database for authentication. "Hashed" values cannot be un-encoded to retrieve the original password value. 


To Enable password retrieval , you’ll need to have enablePasswordRetrieval set to true in the web.config. You can do this in the <membership> node under <system.web>. It’ll look something like below :

    <membership defaultProvider="Sqlprovider">
                <add connectionStringName="database_con" applicationName="MySqlConnection"  minRequiredPasswordLength="4"
             minRequiredNonalphanumericCharacters="0" enablePasswordRetrieval="true" enablePasswordReset="true"
             requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Clear" name="Sqlprovider" 

Hope this Helps.

Give your Valuable Comments.
comments powered by Disqus
Follow me on twitter
About Me
Harpreet Singh
I began programming with C++ when i was 17. Then at the middle of my study .NET came. Then I began to read C# and VB.NET. By the time i learnt SQL and ASP.NET, and developed some websites such as news portals that are active now. Currently i am running my own Software company.
More Articles