RLComputing - Web Design, DNN CMS


DNN - AD/Windows Login Tab Functionality

Implementing AD Authentication and have it work properly on a DNN site has a few steps to it. We spent some time getting this to work so we decided to compile all the steps into one article.

Step 1 - Install and configure the AD Authentication module.

The next two steps change which login tab is on top and what a user sees first.

Step 2 - You will need to edit the SQL database. Open the Authentication table. You will see two entries - DNN and AD. Make sure the ProgramID for DNN is higher than the ProgramID for AD.

Step 3 - Edit the Login.ascx file (\DesktopModules\Admin\Authentication). Look for the DNNTabStrip control. At the end put SelectedIndex="1". This puts the focus on the Windows tab not the DNN tab.

The next steps address the enter key only working on the DNN tab not the Windows tab. The reason for this is a .NET issue. The DNN and AD forms are competing for the focus command. The DNN tab wins out since that is the default. The JavaScript below allows the AD tab to also use the focus command.

Step 4 - This step was the key to allowing users to be able to hit the enter key on the Windows tab not just the DNN tab. You need to create a copy of your skin template. Name it something different. Then add the JavaScript below to the bottom of this new skin. The code should be between <script> and </script> tags. You want to create a new skin template so this JavaScript is not loading for every page. This code only needs to load on the login page.

AD code 

Step 5 - Create a new login page on your web site with the Account Login module on it. You do not need to show it in the menu but you do need to make sure All Users has permission to view the page. Then assign the new skin template you created in step 4 to it.

Step 6 - Lastly you need to change the default login page. Go into Admin - Site Settings. Then on the Advanced Settings tab change the Login page to the new page you just created.

Log out of the site and give it a try.