GetPassword not fully implemented?

GetPassword not fully implemented?

Postby chris@byteme » Sat 14 Oct 2006 07:08

I try to run the followin block of code:

Dim theUser As MembershipUser = Membership.GetUser(CStr(Username))
Dim oldPwd As String = theUser.GetPassword
theUser.ChangePassword(oldPwd, "booknut")

And I get the error, "Specfied method is not supported", stack trace below:

[NotSupportedException: Specified method is not supported.]
CoreLab.Common.Web.Providers.DbMembershipProvider.GetPassword(String username, String answer) +59
System.Web.Security.MembershipUser.GetPassword() +67
usr_admin_security2.ResetPwd(String Username) in C:\Documents and Settings\Chris\My Documents\Visual Studio 2005\WebSites\books\usr_admin\security2.aspx.vb:69
usr_admin_security2.gvUsers_RowCommand(Object sender, GridViewCommandEventArgs e) in C:\Documents and Settings\Chris\My Documents\Visual Studio 2005\WebSites\books\usr_admin\security2.aspx.vb:90
System.Web.UI.WebControls.GridView.OnRowCommand(GridViewCommandEventArgs e) +96
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +121
System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +162
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +118
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +106
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +203
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3840
chris@byteme
 
Posts: 14
Joined: Thu 06 Oct 2005 06:23

Postby Alexey » Mon 16 Oct 2006 07:26

You should set enablePasswordRetrieval attribute in your web.config file to "true".
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL