Restore host account on dnn in any condition.
Loosing host account password can be very annoying. Use this simple data manipulation technique to restore your host account.
This articles seems funny in the condition when you already have host account and you can login to the site using host account.But the purpose of this article is different than you have thought. Suppose you have lost the host account, and you even don't have hint about the password. You even can't use forget password feature , may be you don't have set valid email account for host account or what ever it is.
If you are a quite strong on programming, you can see the sqlserver database, and web.config file for decryption key and create a C# function to decrypt the value. This is some sort of complex process , cannot be adaptable by general users.
Here is the quicker way. Indeed you cannot login from the host account. Sure you can open the website. Now go to the membership page and just create a new member as a general web user do to register to your site. Now you will see that new user on the database. By doing this there will a new user record on the database table. There is a field call IsSuperUser on user accounts table "Users" that actually differentiates the user if its Host or not. For the user newhost change this field(IsSuperUser) to True. Now the user newhost will be treated as Super account (host account). If you login with this user all the host permissions will be seen.Now you can do whatever u want to do. Using this technique you don't have to bother about encryption and decryption.