LDAP with A/D not working

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
11/25/2008 11:21:35 AM
Gravatar
Total Posts 6

LDAP with A/D not working

So far I have been unable to get LDAP authentication with A/D working.

I was wondering how many people have mojoPortal with LDAP using A/D working, and if there were any idiosyncracies I should consider.

I am sure my settings are correct because I have tried them with a couple other LDAP clients.  Using the proper hostname, which is resolvable, would not work at all.  But when I changed the hostname to the IP address of the A/D LDAP server, mojoPortal verified the password OK, and made all the proper changes.  However, I could not login with my (or any other) LDAP UserId and Password.

I am using 2.2.7.9 with SQLite.

Thanks for any help.

 

11/25/2008 11:44:52 AM
Gravatar
Total Posts 18439

Re: LDAP with A/D not working

I think the main thing with AD is to get the host name and domain name right.

Its going to try and authenticate the user as username@domainname

Hope it helps,

Joe

11/25/2008 12:44:27 PM
Gravatar
Total Posts 6

Re: LDAP with A/D not working

Joe...

Thanks so much for the quick reply, and for mojoPortal.

The problem I am struggling with is that the LDAP authentication works fine when I initially set it up.  No error messages.  And it looks like it makes all the proper settings, and ghosts out the settings it should.  It all appears to work fine when I set it up, so it looks like all my settings are correct.  But I cannot login with LDAP.  Would it be possible to get a "Test LDAP connection" ASP page that mimics the LDAP login?

Or maybe if you could post the LDAP leaf and container objects that the LDAP login is querying, and I could see if I can trace down what might be happening?  Or maybe just point me to the code.  I am not an ASP programmer, but I can figure it out if I know what file to look at.

Thanks again!

 

 

11/25/2008 2:09:57 PM
Gravatar
Total Posts 6

Re: LDAP with A/D not working

Joe...

More info...

I've ruled out any configuration problems with IIS by using an LDAP authentication script I found at:

http://bytes.com/groups/asp/53296-active-directory-authentication-asp

I used the same settings I used in mojoPortal, and it authenticated with no problems using username@domainname.

Thanks again!

 

11/26/2008 5:26:15 AM
Gravatar
Total Posts 18439

Re: LDAP with A/D not working

If you're able to try and step through the code, you can set breakpoints in the mojoPortal.Business.LdapHelper.cs file to trouble shoot the problem and see whats happening.

Possible in some AD configurations that the executing thread that is trying to query AD must be running in the context of a user with permission to query active directory. Typically by default on Win 2003 the thread is executing as IIS_WPG user, if you change it to a domain user its possible that will solve it.

Hope it helps,

Joe

2/5/2010 1:01:40 AM
Gravatar
Total Posts 17

Re: LDAP with A/D not working

Hi Joe,

Ive been troubleshooting this issue however, after following all the steps provided on the website and in the forums. I Am still experiencing  a bottleneck......After I enter my password and click save I am greeted by the "Object reference not set to an instance of an Object" exception.

 

This exception is followed by the stack trace below.

 


[NullReferenceException: Object reference not set to an instance of an object.]
   Novell.Directory.Ldap.Connection.shutdown(String reason, Int32 semaphoreId, InterThreadException notifyUser) +354
   Novell.Directory.Ldap.Connection.destroyClone(Boolean apiCall) +211
   Novell.Directory.Ldap.LdapConnection.Disconnect(LdapConstraints cons, Boolean how) +17
   Novell.Directory.Ldap.LdapConnection.Disconnect() +15
   mojoPortal.Business.LdapHelper.LdapLogin(LdapSettings ldapSettings, String uid, String password) +398
   mojoPortal.Business.LdapHelper.TestUser(LdapSettings ldapSettings, String uid, String password) +12
   mojoPortal.Web.AdminUI.SiteSettingsPage.TestCurrentUserLdap(LdapSettings testLdapSettings) +93
   mojoPortal.Web.AdminUI.SiteSettingsPage.btnSave_Click(Object sender, EventArgs e) +4000
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

 

Is there any assistance that you can provide for me re: this issue.
 

2/5/2010 1:01:54 AM
Gravatar
Total Posts 17

Re: LDAP with A/D not worki

Hi Joe,

Ive been troubleshooting this issue however, after following all the steps provided on the website and in the forums. I Am still experiencing  a bottleneck......After I enter my password and click save I am greeted by the "Object reference not set to an instance of an Object" exception.

 

This exception is followed by the stack trace below.

 


[NullReferenceException: Object reference not set to an instance of an object.]
   Novell.Directory.Ldap.Connection.shutdown(String reason, Int32 semaphoreId, InterThreadException notifyUser) +354
   Novell.Directory.Ldap.Connection.destroyClone(Boolean apiCall) +211
   Novell.Directory.Ldap.LdapConnection.Disconnect(LdapConstraints cons, Boolean how) +17
   Novell.Directory.Ldap.LdapConnection.Disconnect() +15
   mojoPortal.Business.LdapHelper.LdapLogin(LdapSettings ldapSettings, String uid, String password) +398
   mojoPortal.Business.LdapHelper.TestUser(LdapSettings ldapSettings, String uid, String password) +12
   mojoPortal.Web.AdminUI.SiteSettingsPage.TestCurrentUserLdap(LdapSettings testLdapSettings) +93
   mojoPortal.Web.AdminUI.SiteSettingsPage.btnSave_Click(Object sender, EventArgs e) +4000
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

 

Is there any assistance that you can provide for me re: this issue.
 

2/5/2010 5:58:15 AM
Gravatar
Total Posts 18439

Re: LDAP with A/D not working

Is your web server part of the domain? Are you sure it is able to connect to the AD server?

It should work with youradusername@yourdomain with your AD password.

You need to make sure you change the admin user login name to your youradusername before you switch so that you will still be an administrator after it starts authenticating against AD.

Hope it helps,

Joe

2/5/2010 8:27:14 AM
Gravatar
Total Posts 17

Re: LDAP with A/D not working

Hi Joe,

I followed all the steps you mentioned, however I am still greeted by the error page. Is there any information in the stack trace I provided that can help me in diagnosing my problem?

2/5/2010 8:31:46 AM
Gravatar
Total Posts 17

Re: LDAP with A/D not working

Please note as well that I have the Active Directory housed on the same box as the web server.

Thank you,

Andrew Ellis

You must sign in to post in the forums. This thread is closed to new posts.