Resolving DNN Login Issues With Login Tab Selection 

Recently I have answered a number of questions regarding what to do when you accidentially change the login tab setting in "Portal Settings" on a DotNetNuke website to a tab that does not have a login module. This situation which is very easy to get yourself into is also one that is VERY easy to get out of as long as you are able to directly connect to SQL Server. If you are unable to connect directly to the SQL Server to run queries it will be a bit more involved to resolve the issue. In this posting I will discuss the very simple SQL Script needed to reset the LoginTabId value and get you back into your site.

Getting Ready

As I mentioned this process is very simple and you ONLY need 1 piece of information to be able to successfully execute the script that I will provide below. This piece of information is the "PortalId" of the portal you wish to modify. If you are unsure of your portal id you can easily locate it by running the following script to get a listing of portals.

SELECT portalId, portalName
FROM portals

Once you have your portal id we are ready to fix your site!

Performing the Fix

To fix your site we will simply clear the value for the Login Tab selection, this will remove any setting for a login page and the login link will function like a standard DNN installation will by injecting the login module for you. After you are back into your site you can re-configure the login tab selection to the proper tab. To perform this database change simply run the below script, be sure to modify the portalId value to be your proper portal id.

UPDATE portals
SET LoginTabId = NULL
WHERE 
PortalId 0

Now that we have updated the login tab value we will need to trigger an Application Restart due to the caching that is completed by DotNetNuke. The easiest method of doing this is to add a space to a NON critical portion of your web.config file and saving the change.

Once you have saved your web.config file you should now be able to browse to your site and login as normal! Please let me know if you have any questions or feedback regarding this tutorial.

Posted by Mitchel on Wednesday, August 01, 2007
 

Comments

Does ctl=Login no longer work?

By Hooligannes on Wednesday, August 01, 2007 at 10:05 AM

ctl=login has not really worked since I believe it was 4.4.1? or maybe it was 4.5.

I have seen it work at times, but for the most part it doesn't.

By mitchel.sellers@gmail.com on Wednesday, August 01, 2007 at 10:26 AM

ctl=Login always worked for me - HOWEVER! if you have Login tab set... ctl=Login will redirect to that page haha! back to the original issue.

Mitchel - excellent post. It freaked more than one person out...

By vitkoz on Friday, August 03, 2007 at 7:36 AM

What do i do if i cant access any scripts? I am just editing and dont know if i can even access this site on any db. it seems the only way to edit or fix this would be through my url... :[

By tia on Friday, September 14, 2007 at 11:20 AM

Sadly, with DNN 4.4.x running this script is the ONLY fix for the issue. The URL fix no longer works.

By mitchel.sellers@gmail.com on Friday, September 14, 2007 at 1:43 PM

That's not true. I screwed this up quite a few times on my own. You need a backdoor login on your root directory that you can navigate directly to. Login and fix your problem. I do hear you aren't s upposed to use this on a regular basis, but not sure why.

http://blogs.snapsis.com/CommentView,guid,3078311e-6925-4c03-8243-d1b9c8a11906.aspx

By andrea turner on Wednesday, November 28, 2007 at 9:26 AM

Andrea,

My instructions are EXACTLY the same as the script provided by John Mitchell. He just put a fancy page in there that does the script automatically rather than having you manually execute the update.

By mitchel.sellers@gmail.com on Wednesday, November 28, 2007 at 9:44 AM

My database is not recognizing the portal table? Is there another fix or a different table name in the newest DNN version?

By Tonee Porter on Tuesday, March 25, 2008 at 10:04 AM

If you have an object qualifier specified in your web.config you will need to add it to the beginning of the table name.

By mitchel.sellers@gmail.com on Tuesday, March 25, 2008 at 10:15 AM

I am having a different login problem that is driving me crazy! :-)

I have multiple parent portals. I can login to one, but then I can't login into any other portal. It just bring me back to the home page with no errors. Later - sometimes an hour, sometimes overnight - I can login to a different portal, but not into any others, including the first one.

I cleared cookies, allowed all, even switched to Firefox but the problem is still there.

Any ideas?
Thanks!
alex

By Alex Ludden on Wednesday, April 02, 2008 at 4:42 PM

Alex,

I would try an IISReset to see if that fixes it.....if not, post a message to my forum and I'll try to help you.

By mitchel.sellers@gmail.com on Wednesday, April 02, 2008 at 5:00 PM

WOW! I SPENT 4 HOURS LOOKING FOR A SOLUTION TO THIS PROBLEM AND THIS ONE WORKED!

THANK YOU SO MUCH!

Dave

By Dave on Saturday, April 05, 2008 at 8:32 PM

Brillant.. one try one unlock! great work!

By Aaron on Friday, May 09, 2008 at 8:18 PM

You my dear, saved my butt today - I could kiss you! Thanks.

By Kimmer on Thursday, August 07, 2008 at 6:01 AM

BRILLIANT!! Thank you so much. worked great

By JERRY on Saturday, September 13, 2008 at 11:58 AM

Mitchel!
Thank you very much. You saved us hours of work. Little security tip, don't give admin role to your customers:)

By Sabina on Tuesday, December 30, 2008 at 5:27 AM
Click here to post a comment

Donate

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content.