GetPassword METHOD

GetPassword METHOD

Postby JORGEMAL » Fri 28 Nov 2008 16:27

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:

<%@ Page Language="C#" Debug="true" %>

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
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby Shalex » Tue 02 Dec 2008 08:16

Thank you for the bug report. We are investigating this issue. You will be notified about the results as soon as possible.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Tue 02 Dec 2008 12:44

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").
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44

Postby JORGEMAL » Tue 02 Dec 2008 15:52

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.
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby Shalex » Thu 04 Dec 2008 13:25

If you want to use the passwordFormat="Encrypted" option, it is necessary to add the machineKey attribute to your Web.config file.

E.g.:
Code: Select all
22B84C1791B5AD5B02EEA3F55FE9358F235943350C91455"
decryptionKey="7211388E81AB04B4A248F0C7EAF605E64104C47C586BD84FDC7E3EBF7DEFB4B5"
validation="SHA1"
decryption="AES"/>


Please use some "generate machine key tool" to obtain your own key.
Shalex
Devart Team
 
Posts: 7780
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL