A former twenty something in technology
 
Comments

Worked like a charm

Hi, I tried to upload the RecoverPassword.aspx but I keep being told that I’m not allowed to upload .aspx files, it’s a “resticted file type”. If I use ftp it won’t display it I changed the name to .xml and that uploaded fine but doesn’t work.
Can you help?
Thanks,
Jim.

Make sure you’re FTPing the file to the root directory of your dnn application (same folder your web.config is in).

Thanks! This worked perfectly and was needed because the password retrieval didn’t work. The email is never sent. Perhaps because I am running the web site on my own WIndows 8 platform on a DHCP Time Warner Cable IP.

What version does this work for? I verify it works on a 5.1 version. However, I have a pretty old (maybe 4.x) install of DNN and got the following error:

Compiler Error Message: CS0117: ‘DotNetNuke.Entities.Users.UserController’ does not contain a definition for ‘GetUserById’

Source Error:

Line 4: {
Line 5: DotNetNuke.Entities.Users.UserInfo uInfo =
Line 6: DotNetNuke.Entities.Users.UserController.GetUserById(0, 1);
Line 7:
Line 8: if (uInfo != null)

Any help is greatly appreciated!

Ok, I just verified my version in the database. It is DNN 4.3.3, which this method does not work on.

This script is fairly simple. Line 6 just calls the UserController to get the user by id. In DNN 4.3.3 that particular version may have a different signature then it does today or have a different name.

I’ve been meaning to update this script in order to handle more use cases. Perhaps I will look into that now.

But in the mean time for DNN version 4.3.3 you can change line 6 to use DotNetNuke.Entities.Users.UserController.GetUser(0,1,false); or GetUserByName(0,”host”,false);

Awesome! It worked! My password was “host”! Really??? Ok, so it was one of my first DNN installs afterall so, yeah, that makes sense, right? 🙂 Thanks so much for your help! You’re a lifesaver!

Worked! Thanks so much for posting this help…!

It doesn’t seem to work on DNN 6.2.7
Any Help?

I just used it on DNN 6.2.7 and it worked great. Just be sure to put it into the root of the install folder, and not the root of the portal.

Thank you very much and it worked for DNN 7.0 before these the user must make the two parameters to be changed if the password is set to Hashed this code wont work. in web.config change the parameters enablePasswordRetrieval=”true”, passwordFormat=”Clear” before installation of DNN. I request you to find the recovery of Hashed parameter mode. thanks and I am adding the same in a dnn step by step tutorial and referring your link in the document.

Incredibly useful, thankyou

Awesome!! It worked on DNN 6.2.5.24. Thanks!!!

How about today in DNN 7 environment and starting out with a good enablePasswordRetrieval True and passwordFormat Hashed? The host starts out hashed… we would need a newer script that would allow you to do something like change the host email address to one you specify and then send out the standard forgot password reset email.

what do you think?

Jonathan Sheely

Yes I agree. I have such a script already. I’ll post a new blog with the release.

Hi,
I have DNN 6.2.5 and I try your script and it didn´t work. Could you help me with this issue. I´m not an xpert in SQL data bases

You can have a new try like the first method mentioned in this post below:

http://knowledge.3essentials.com/web-hosting/article/376/Reset-DNN-host-password.html

It works for all the versions of dnn and it just requires you need to know someting related with db table.

Hope it helps.

You are a life saver!!! Was trying to login as Host. Kept saying password was wrong. Used your technique and it gave me the password I thought it was. So database is not an issue. Thought for sure I had an encryption issue. Then I thought, maybe I should try using my e-mail instead of “Host”, which is how I logged in before I upgraded to DNN 7.3.2. When I used my e-mail address instead of Host, it worked. I was able to get in! What a relief. I have spent 5 hours troubleshooting this, and if I had not found your suggestion above, I never would have been able to narrow down the issue. Thanks so much!!!

Leave a Reply