Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAD Authentication only logs some user in, not allAD Authentication only logs some user in, not all
Previous
 
Next
New Post
11/4/2010 3:28 PM
 
Patrick Reddy wrote:
Mike,
I tried deleting my test user and then accessing the intranet site from a machine where I was logged in as that user. The problem seems to be something fundamental. When I 1st browse to the site I get an error - the second time I get in to the site but I am not logged in - I am just at the home page wityh the typical Login link. Am I missing something simple? Below is the error:

Server Error in '/Intranet' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
DotNetNuke.Authentication.ActiveDirectory.AuthenticationController.AuthenticationLogon() +376
DotNetNuke.Authentication.ActiveDirectory.WindowsSignin.Page_Init(Object sender, EventArgs e) +127
System.Web.UI.Control.OnInit(EventArgs e) +131
System.Web.UI.Page.OnInit(EventArgs e) +15
System.Web.UI.Control.InitRecursive(Control namingContainer) +142
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1476

 I'm going to answer each post separately to prevent confusion.....

I'm not sure why you're getting that error and I don't have the source code handy to see what's happening around line 376 of the controller. I'll try to look at it when I get back to the office. However I think I do understand why the second time you go to the site it does load but doesn't log you in. More on that in my reply to your last post as they're related.

 
New Post
11/4/2010 3:50 PM
 
Patrick Reddy wrote:
Another issue I'm seeing, and I hope it's ok to address it here....is that all my user names are preceded with the domain name, which happens to begin with a #. 6Mpreddy, 6Mmvanerik, etc...

Becasue of this I can'tuser the user management UI to find users - it only allows me to search by letter!

 The users should be listed as 6M\username (I'm making an assumption that's what you're seeing). This was implemented by design with the original provider (long before I became involved in the project). I can only guess at the reasons though on automatic login that's how the username is passed from the AD. I've written code to strip the domain from the username but never implemented it for a couple of reasons. The first is that I haven't found an elegant way to strip the domain name from existing usernames in the database or add it back in if the admin needed to and, second, how to handle things in a mixed-mode site (sites that use both the standard login and the AD provider). The real culprit is the specter of mix-mode sites as the potential for username conflicts exist. Example: Say that the dotnetnuke.com leadership decided to implement the AD provider for their employees on this site at this time and then hire some guys named Mike Hamiltion and his domain username is mikeh. Without the domain name preceding his username there would end up being a confilct of some sort (pretty sure my account would get the short end of the deal). Or, conversely, if the ability was there to strip the domain out of the username and when they implemented the AD provider they set it up that way and then realized there was a conflict between the two mikeh accounts so they wanted to put the domain in front of their employee accounts. I don't know the number of the registered users on the site but I believe it's > 500000. How do you tell what accounts are domain accounts and what accounts are external accounts.

When you look at the user accounts in the search box you can set the field it looks for. On the site I run for the school I work for I usually just do a search on the person's first name.

 
New Post
11/4/2010 3:57 PM
 
Patrick Reddy wrote:

Hey Mike,

One more update before I head out for the day.  I went ahead and deleted all users that were created via the import and reseeded the users table ID.  I'm seeing varying results now with my testing.

I first logged in to my machine as user A, browsed to the site, and viola - it worked! - logged me in just fine.

I then logged in as user B, browsed to the site, but did not get logged in.  No errors & nothing in the event log indicating that any attempt was made to authenticate against AD.

I then followed the Login link and logged in manually - worked fine - authenticated against AD and created the user.

I then deleted both users again and ran the test again.  This time neither user was logged in/authenticated against AD automatically, but again, when I logged in manually it did authenticate and create the users.

Do you know why it doesn’t always authenticate against AD went the user browse to the site?

Not sure why it didn't work for user B the first time unless it's related to why I'm pretty sure it didn't work the second time for either account.

When the user is automatically logged in IIS puts a cookie on the computer that lasts for a random amount of time (usually about an hour). This prevents the number of times an authentication attempt is made. So, when you went back with user A the second time the cookie was still set and the authentication process was skipped (the same thing will happen if you log the user out and then go back to the site within an hour). What I don't know is if you'd used User B as part of your testing earlier and that's why it was skipped both times. All I can suggest is that while testing you blow away your cookies and browser cache every-time before going to the site.
 
New Post
11/8/2010 1:43 PM
 
Ok, no problem.  I noticed now that the domain name is a prefix to the username, just as it is used in Windows.  If I select Lastname filter from the user UI everything is fine.  Thanks.

I reply to your other post seperately.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAD Authentication only logs some user in, not allAD Authentication only logs some user in, not all


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out