I just moved a DNN (DotNetNuke) installation from a computer to another and restored the database in order to be able to work locally. DNN uses asp.net Membership as its default security provider thus I could not login to the web site (all passwords are encrypted using the local machine key). In order to override the password I wrote the following lines of code:
Happy coding and don't forget to delete the above mentioned lines after reseting the passwords!
Dim mu As MembershipUser = Membership.GetUser("MyUserName")In the default page’s init event. This is the way to programmatically change any membership account’s password.
mu.ChangePassword(mu.ResetPassword(), "mytoughpassword")
Happy coding and don't forget to delete the above mentioned lines after reseting the passwords!
1 comment:
Thanks! Saved me a headache this morning.
Post a Comment