Friday, May 18, 2012 Register  Login

This site uses DNS Made Easy. Use it for reliable and professional DNS services.

RSS Feeds
Categories
  
Blog Archives
  
Blog

Retrieving login data for DotNetNuke

Well, I had a hair pulling session trying to recover the passwords on my hobby site. Both my admin and host paswords got hosed, so I couldn't just login and fix them.

I first went Googling to find a winform app to help with this problem. Well, all the solutions were just modules to install on your DotNetNuke installation. Since I can't even login as host, this approach is just totally useless. Thankfully, DNN uses the ASP.NET 2.0 Membership Providers.

So, I started with Membership.Provider.RetrievePassword(). Oops, "Bad Data". Crap! I tried other account passwords with the same result. Double-Crap! I modified my little winform app, to now reset passwords. This time I used Membership.Provider.ResetPassword(). Got a new password for host, and I was able to login now. YES! I'm using .NET 2.0 for this winform app.

So if you want to get this working, here is what you need to do:

Make sure that you include the following sections from your DNN's website web.config file:
connectionStrings
system.web

You only need the membership and machineKey sections inside system.web.

Import System.Configuration and System.Web into your project. All of the needed API calls will be under Membership.Provider namespace. You'll find a lot of samples on how to use on Google.

Anyways, I wanted to put it somewhere, so that I can find it later, WHEN I would need to do this again.

posted @ Monday, June 16, 2008 11:09 AM by Hector Sosa, Jr

Actions:Tweet This Share on Facebook Share on LinkedIn Emakl Permalink del.icio.us

Previous Page | Next Page

COMMENTS

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

Terms Of Use | Privacy Statement | SystemWidgets
Copyright 2002-2012 by SystemWidgets
Google Analytics Alternative