Monday, October 25, 2010
Asp.net password membership change password forms authentication
Now a days security is the major factor while developing websites. While developing secured websites using asp.net developers must consider asp.net membership database etc. How to configure asp.net membership db
Sometimes the programmer may need to change the username and password in asp.net membership database. This article describes some possible ways to change username and password in asp.net membership provider
Change Username in ASP.NET membership database
The username is storing in aspnet_Users table. So to change run the following query
UPDATE aspnet_Users SET UserName = @UserName
,LoweredUserName = LOWER( @UserName)
WHERE UserName = @CurrentUname
How to change password in membership database
To change password the programmer can use ResetPassword() function. see the example below
MembershipUser Obj = Membership.GetUser(UserName.Text);
Obj.ResetPassword();
But following is the most useful way
MembershipUser Obj = Membership.GetUser(UserName.Text);
Obj.ChangePassword(Obj.ResetPassword(), Password.Text);
TACS LLC Dubai
Time Attendance Dubai
Access Control System
Gate Barrier
HRMS Solutions
EID Reader Software
EID Reader
Building Maintanance
UHF Reader
Regards
Subscribe to:
Post Comments (Atom)
This website can be a walk-by means of for all of the data you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely uncover it. casino bonus
ReplyDelete