Security :: Membership Change Password Doesn't Working?

Feb 25, 2011

I have this code for changing a user's password when they click the password reset button (with extra code to log to ELMAH so I can try to figure out what is going wrong).

This is in ASP.NET MVC 2, using the standard aspnet membership provider, with a simple View like this:

New Password: ______
Confirm Password: ______
[Reset] [Cancel]

The route to this view is `/Account/Reset/guid`, where guid is the user's id in the aspnet membership database.

The key portion of the code is where it calls `user.ChangePassword()`. You can see that it logs a message when successful. The problem is that for some users, the success message is logged, but they can not log in with the new password. For other users it logs the success message and they can log in.

if (user.ChangePassword(pwd, confirmPassword))
{
ErrorSignal.FromCurrentContext().Raise(
new Exception("ResetPassword - changed successfully!"));
return Json(new {
Msg = "You have reset your password successfully." },
JsonRequestBehavior.AllowGet);
}

The full code listing is:

[Code]....

Edit: Adding a bounty to try to get this solved. This is one of the most annoying problems on my issue list, and I have no idea how to proceed.

View 1 Replies


Similar Messages:

Security :: Change Password Without Enter Current Password For Membership Provider?

Jan 13, 2010

I using change password control, how can i change the password without enter the current password?

View 8 Replies

Old Password Still Working After Password Change In Membership?

Sep 21, 2010

Am using ASP.NET membership authentication in a small website and i just noticed some thing funny during testing. Am trying to enable user to change their login password any time they wish, i dragged a change password control to the form, i changed the password for my test account, but now all passwords are still working.

I can login with the old password as well as the new password with this particular test account. If i try with any other random characters as the new password, i cant successfully login (which OK). But if type the old password, am able to login, if i type the new password, am still able to login, am finding this very strange.

View 2 Replies

Security :: Access Membership Provider - Doesn't Support Password Recovery

Jan 6, 2010

I use access membership prvider and it works. but I am unable to recover passwork. It says that "" membership provider doesn't support to get and zero password." It gives me the error in turkish and I translated it. Something like that. I am using the below code;

[Code]....

how can I do that?

View 3 Replies

Security :: Using Control Membership And Profile For Change Password

Apr 18, 2010

I using control Membership and profile for change Your password. It is error when i login again.

View 2 Replies

Security :: Changed Web Config Membership Properties - Wants To Change Password?

Jan 13, 2011

I've made a change to my web config membership properties and now I seem to be having issues changing my password. I originally had

minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0"

I've change it to passwordStrengthRegularExpression="^(?=.{8,15}$)(?=.*[0-9])(?=.*[A-Z]).*" however it still keeps coming up telling me that I need at least 7 characters and one nonAlphaNumberic... I looked at my machine config and made some adjustments there so that

minRequiredPasswordLength="" minRequiredNonalphanumericCharacters="" were blank

View 8 Replies

C# Membership Provider - Reset Password Features - Email Confirmation And Password Change?

Jun 28, 2010

Does anyone has a solution (sample code) for the following features:

Create a randomGuid/Cryptographically strong random number Send a unique URL containing the random number to the user's email address When confirmed, the user is asked to change password

My provider is currently parametrized this way:

[code]....

The security issues with this type of procedure have been discussed here before.

View 2 Replies

Security :: Migrating Existing Cleat Text Users Password To Hashed Password Membership Provider?

Sep 9, 2010

I had been trying to solve this but there is a hidden key i wish someone point me to.

I had a simple membership database with users in first the Membership Provider configured for clear password to retrieve the original password .

Now a new requirement say that the password must be hashed and reset .

I configure the Membership password to hash , and Implemented the Reset Password Module.

My problem is as follow.

If the user is new registered user with the new configuration the password and the security answer is hashed.

also when I go and reset the password it continue to be hashed.

Now I thought that with new configuration if any previous user with clear text configuration , If he use the password Reset module , because my configuration now is hashed , I expected that the new password and security answer will be hashed . what happen is old user continue in clear text even if the configuration is hashed. so If I had new users everything is fine.

old users Membership Provider somehow know they had been stored in clear text and it keep change password and security answer in clear text . If I delete this user and create it , Membership Provider understand that everything will be hashed. I need to know how it know this , I need to migrate users not to delete and recreate users .

Also if there are no solution for that , I wish Microsoft Consider it in future cause it is a real user scenario, that can happen imagine a business system that related to membership user Id , deleting users and recreate them is not a solution .

View 1 Replies

Security :: Change Password Not Functioning / Password Incorrect Or New Password Invalid

Mar 14, 2011

I can recover my password but when I try to change my password to something a bit easier to remember it gives me:

Password incorrect or New Password invalid. New Password length minimum: 7. Non-alphanumeric characters required: 1.

View 7 Replies

Membership Change Password Without Knowing Old One?

Feb 16, 2011

Evaluting the method signature, it is required to know old password while changing it.

membershipUser.ChangePassword(userWrapper.OldPassword, userWrapper.Password)

Is there any way to change password without knowing old one.

View 2 Replies

Security :: Password Change Control Won't Accept New Password?

Aug 18, 2010

I am developing a shopping cart with asp.net and sqlexpress. I am using aspnet authentication components to create a backend page. I designed the site to let in only authorized users in.

Yesterday, I forget my password to login to backend and asked system recover my password. with recover password of the asp.net I was able to receive the temp password. I took that and logged in, of course asp.net forward me to password change component which I am having problem with.

Every time I change my password , password change shows that I was successfull but after clicking on the continiue button password change component comes back. I went to properties of password change component and entered the main default page as destination but it is not helping.

I close the IE clear the cache , even restart the machine. When I login always taking me to the password change page.

View 2 Replies

Security :: Membership.CreateUser Without Password?

Feb 7, 2011

Is there possibility to create new user with Membership.CreateUser but not to specify the user's password?

I tried with minRequiredPasswordLength="0" minRequiredNonalphanumericCharacters="0", but it didn't work.

I also tried with "" and DBNull.Value for password in the function but it didn't work.

Is there a way to do this?

View 8 Replies

Security :: Aspnetdb Membership Changes Password Bug?

Dec 19, 2010

I have developed a Silverlight app using forms authentication and the asp net membership, aspnetdb, the whole enchilada.The bug I see is that the password for my users change by them self every bow and then, the way I fix them is by deleting the user and creating them again, this has been I problem all the time.In a post I read the problem was manifesting because I didn't have a machineKey in my web.config, I now do, so I dunno what the problem is this time...Is there a definitive fix to this? can you please provide assistance?

View 11 Replies

Security :: How To Get Membership User Hashed Password

Jul 28, 2010

i have implemented asp. net membership authentication and one of my users has forgotten his password.

The passwords are hashed and when i try retrieveing his password i get the error that password retrieval is not available for hashed passwords.

Should i reset the password?

View 13 Replies

Security :: How To Reset And Get Password Of Membership User

Jun 22, 2010

I am working on membership concepts in asp.net. Now i want to reset new password and getpassword for specific user.


this is my web.config code:

<add name="MySqlMembershipProvider" connectionStringName="SQL2005DB380ConnectionString" applicationName="MyAppName" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Encrypted" enablePasswordReset="true" minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

How can I get old password and reset new password.

View 4 Replies

Security :: Membership, Password Hashes And MachineKey?

Jun 29, 2010

I have a question about the encryption key/keys the standard ASP.NET Membership provider uses for creating the password hashes.Although we haven't deployed this new system we are working on yet, we might switch servers in the future. So I thought it might be a good idea to specify the encryption key/keys in the web.config file to avoid any problems with mismatched hashes if we do switch servers.We use the standard ASP.NET Membership provider ("AspNetSqlMembershipProvider"), passwordFormat is set to "Hashed" and we use Forms authentication.The current web.config file initially did not have any machineKey element. I used the web application and had registered and thus created an account and the hash of my password is stored in one of the aspnet_* tables.Then I created a machineKey element in the web.config file, and specified validationKey, decryptionKey, validation and decryption attributes. I had expected not to be able to log in with my password anymore, but I was surprised that I could still do so with the existence of the new machineKey specifying new encryption keys.So - why can I still log in?Does the AspNetSqlMembershipProvider not use the encryption keys specified in machineKey?

View 7 Replies

Security :: Validating User Password From Membership Provider Elsewhere?

Feb 9, 2011

I am using Membership provider.. I integrated the aspnet member tables into my database.

I need the user to enter password on a data entry form and validate it against the membership tables.

How can I do this. This is the set up. I have few fields and user enters those fields and also enters the password, and submits the form. It is kind of like signature... i am looking for something like..

If txtPassword.text = membershipprovider password

{
//do this...
}

View 1 Replies

Security :: Password Encryption With Custom Membership Provider?

Oct 12, 2010

I am using a custom membership provider with a custom ValidateUser method. The ValidateUser sends and additional parameter to authenticate my users (Username, Password, and Dealer). I created a custom stored procedure for ValidateUser to call. I copied over all my users from another table and encrypted all the passwords in the aspnet_membership table using the code below. My question is, how do I take the password the user enters in the login form and validate that against what is in my aspnet_membership Here is the code I used to encrypt the passwords (not even sure this was the right way to encrypt. Please tell me if I did this wrong):

public static string EncodePasswordNow(string originalPassword)
{
Byte[] originalBytes;

[code]...

View 1 Replies

Security :: Reset Password Based On Passwordquestion And Passwordanswer In Membership?

Jan 17, 2011

I want to get code for reset password based on passwordquestion and passwordanswer in membership.

View 1 Replies

Security :: Membership Table Not Updating Password Correctly With User Wizard?

Jan 2, 2010

There seems to be something wrong with the create user wizard?I am using hashed password storage. When I change it to clear storage I see the user's password is being stored as something completly different than what they typed in.Example: changeme1 now equates to something like: 4W*KQQ4%=SIf I use 4W*KQQ4%=S as the password to login with it works but changeme1 does not.When I use the reset password wizard it updates the password just fine and it works when I login next.Any clues what could be causing this?

View 1 Replies

Security :: Decrypt And Encrypt Password In Table Membership In Aspnet Databas?

Apr 14, 2010

how to decrypt and encrypt password in table membership in aspnet databas ?

View 8 Replies

Security :: Password Recovery Doesn't Go Into Question Template Section

Mar 11, 2011

I have a problem....my password recovery control is not going into Question Template section ....It was working fine for a couple of days before but for some weird reason it stopped working.....Whenever i click the submit button it directly goes and calls the PasswordRecovery1_SendingMail function(it doesn't ask any password recovery question)

[code]....

View 2 Replies

Security :: Change The .net User Password?

Dec 10, 2010

I'm using the ChangePassword method of membership provider to change the password and one of the requirement before calling the changepassword is to retrieve the current password. But I'm getting error:padding is invalid and cannot be removedbelow is my web.config:

< system.web> < machineKey validationKey="4FD671E39167DFB91A918018007D095E50B7D2971B01AEDE26A7233FD9CC4A470F80689997EC2C7BB515F9D82C8B4D1F3A8495193630B11E8401C96BD0A5A133" decryptionKey="ED1555E75C7B91738172E0086456C70B9CAA4C44214FC2B1907123993EA4FA53" validation="SHA1"
decryption="AES"/>....< /system.web>

View 1 Replies

Security :: Change Password Control?

Jan 13, 2011

I got a problem here and i desperately need your helps through this.Ok,i use Change Password control to allow user to change their password.I use administrative tool to setting their username and password.When i run my project and clicks on Change Password button,i got below error:"Password incorrect or New Password invalid. New Password length minimum: 6. Non-alphanumeric characters required: 0."It means,change password attempt is unsuccessful.Why this happen?

View 4 Replies

Security :: Use Change Password Control?

Dec 21, 2010

some links or guides on how to use Change Password control in asp.net?I already succeed implemented the login control in my application.And now i want to put change password control in my application so that the user can change their password accordingly.How can i do this using asp.net?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved