I cannot change password can someone check my code pls

Discussion in 'ASP.NET 2.0' started by bigmike40, Apr 24, 2007.

  1. This is actual one of the password that was generated 7q@M*t{DCx)0;h


    Do i have to setup an event handle for the changepassword id to work or i have to write some codes


    Thanks
     
  2. I cannot get the changepassword id to work.When i try to change the password i keep getting that the password is incorrect or new pasword is invalid non-alphanmeric character required. Even when the password recovery send me a new password and i past it in i still get the same message. any ideas
    i'm using sql2000
    Thanks



    <authentication mode="Forms">


    <forms name="SqlAuthCookie"


    timeout="10" />


    </authentication>


    <authorization>


    <allow roles="ADMIN" />


    <deny roles="ADMIN" />





    <allow users="*" />


    </authorization>


    <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">


    <providers>





    <add name="SqlProvider"


    type="System.Web.Security.SqlMembershipProvider"


    connectionStringName="LocalSqlServer"


    enablePasswordRetrieval="false"


    enablePasswordReset="true"


    requiresQuestionAndAnswer="True"


    passwordFormat="Hashed"


    minRequiredPasswordLength="7"


    minRequiredNonalphanumericCharacters="1"


    applicationName="/" />


    </providers>


    </membership>
     
  3. Does your newly generated password have a non - alphanumeric character? If no then try setting minRequiredNonalphanumericCharacters='0'

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. It is very informative but i was not aware i have to create a custom membership provider to get the changepassword to work .Can i create a custom provider even though i'm using a aspnetdb . I'm not farmilar with the classes i'm just a newbie so i'm goinglook more into the steps and figure out what is burning membershipprovider is
    Thanks
     
  5. Yeah, aspnetdb refers to your database schma used by the membership provider.In the link i sent you ,the burning membershipprovider(CustomMembershipUser in the following example) is the custom membership provider and nothin else.All you need to do is override the Changepassword function in my MembershipUser class as follows:

    Imports Microsoft.VisualBasic

    Public Class CustomMembershipUser:Inherits MembershipUser
    Public Overrides Function ChangePassword(ByVal oldPassword As String, ByVal newPassword As String) As Boolean
    Return Membership.Provider.ChangePassword(Me.UserName, oldPassword, newPassword)
    End Function
    End Class

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  6. I created a the classbut still dont work








    Imports Microsoft.VisualBasic


    Public Class lesson


    Public Class CustomMembershipUser : Inherits MembershipUser


    Public Overrides Function ChangePassword(ByVal oldPassword As String, ByVal newPassword As String) As Boolean


    Return Membership.Provider.ChangePassword(Me.UserName, oldPassword, newPassword)


    End Function


    End Class


    End Class
     
  7. Is ittrue that you cannot email a hashed password in the changpassword id
    i was told that is the reason why i'm getting the error?[​IMG]
     
  8. You can only reset hashed passwords. To be able to retrieve passwords set the passwordFormat to "Clear".

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  9. Hi vvshrama

    Ok let say someone forgets their password. when they request a password ,the system send a generated password which you would to log on ,then change the
    password.Now which password do you put in the changepassword id. Itsays
    oldpassword
    Newpassword etc. arent you supose to put in the generated password in box that say oldpassword... then create a new password andput it in the newpassword box?.if that is not the correct way, how would oneknows the old password if the onlyreason why youusing the forgotpassword control isbecause you forgot the password .sSo what is the purpose of the generated password ?i thought that uwould put it in the old password in box
    then chnage to a new one
    Thanks
     
  10. Arisotle how do you set the pasword to clear
     
  11. nevermind artisole isow where to do it
     

Share This Page