Page 1 of 1

GetPassword METHOD

Posted: Fri 28 Nov 2008 16:27
by JORGEMAL
I am trying to get the password of a user and I get an error message which I include at the end of this post.

The GetPassword method supports 2 overloads according to IntelliSense:
1. GetPassword() ----> No parameters.
2. GetPassword(passwordAnswer As String)
No matter which oveload I use I get the exact same error message.

Reviewing such a message I can make the following comments:
The last line shown in the Stack Trace shows that Devart is expecting 2 parameters: the username and the answer; and none of the 2 oveloads mentioned above supports these 2 parameters.

Can you please tell me how can I make this method work?

Here is the error message for your reference:
---------------------------------------------------------------------------------
Specified method is not supported.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: Specified method is not supported.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:



or:

2) Add the following section to the configuration file of your application:







Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[NotSupportedException: Specified method is not supported.]
Devart.Common.Web.Providers.DbMembershipProvider.GetPassword(String username, String answer) +84
System.Web.Security.MembershipUser.GetPassword(String passwordAnswer) +80
Usuarios.BuscaPorClave(String Clave) +32
Membresia_NuevoUsuario.Page_Load(Object sender, EventArgs e) +311
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Posted: Tue 02 Dec 2008 08:16
by Shalex
Thank you for the bug report. We are investigating this issue. You will be notified about the results as soon as possible.

Posted: Tue 02 Dec 2008 12:44
by Shalex
We will correct the message text. Please set the enablePasswordRetrieval option to "true" in the registration string of membership provider in the Web.config file and select another way of storing the password in the passwordFormat (not to set it to "Hashed").

Posted: Tue 02 Dec 2008 15:52
by JORGEMAL
Shalex wrote:We will correct the message text. Please set the enablePasswordRetrieval option to "true" in the registration string of membership provider in the Web.config file and select another way of storing the password in the passwordFormat (not to set it to "Hashed").
I set the PasswordFormat to "Encrypted" and now I get a ProviderError CreateStatus message; nevertheless, if I set it to "Clear" it works fine.

Does the membership provider accept the "Encrypted" method?
I do not want to send passwords in clear text.

Posted: Thu 04 Dec 2008 13:25
by Shalex
If you want to use the passwordFormat="Encrypted" option, it is necessary to add the machineKey attribute to your Web.config file.

E.g.: Please use some "generate machine key tool" to obtain your own key.