472,982 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

How do you figure out the LDAP://? ("Error authenticating. Error authenticating user. The specified domain either does not exist or could not be contacted")

Hi,

I am using the example "Authenticate against the Active Directory by
Using Forms Authentication and Visual Basic .NET":

http://support.microsoft.com/default...B;EN-US;326340

But I am having a problem figuring out the LDAP://

The LDAP:// that I pass looks like this (i substitued generic the
following with generic name):

Dim adPath as String =
LDAP://DC=SomeDomainControllerComputerThatHasActiveDirect ory"

But I am receiveing the following message when I try to log in with
the example:
"Error authenticating. Error authenticating user. The specified domain
either does not exist or could not be contacted"

How do I figure out how my "LDAP://" should look like?

Thanks,

Phin
Nov 17 '05 #1
3 16364
Hi Marc,

Thanks for the tip, it worked! The thing that doesn't work now is
trying to find the group that the user is in ("Error obtaining group
names"). So, I commented out the code "adAuth.GetGroups()". Does
anybody know how to get "adAuth.GetGroups()" working from the example:

http://support.microsoft.com/default...B;EN-US;326340

Besides that I can log in. Do I really need to check for group name?

Thanks,

Phin

"Marc Nivens [MSFT]" <ma***@online.microsoft.com> wrote in message news:<O3**************@tk2msftngp13.phx.gbl>...
DC= should be followed by a domain DN, not a servername. If you want to
bind to DC1 in domain domain.com, you would use this:

LDAP://DC1/DC=domain,DC=com

If you use serverless binding, you would just use:

LDAP://DC=domain,DC=com

--
Marc Nivens
Enterprise Messaging Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"mrwoopey" <mr******@yahoo.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

I am using the example "Authenticate against the Active Directory by
Using Forms Authentication and Visual Basic .NET":

http://support.microsoft.com/default...B;EN-US;326340

But I am having a problem figuring out the LDAP://

The LDAP:// that I pass looks like this (i substitued generic the
following with generic name):

Dim adPath as String =
LDAP://DC=SomeDomainControllerComputerThatHasActiveDirect ory"

But I am receiveing the following message when I try to log in with
the example:
"Error authenticating. Error authenticating user. The specified domain
either does not exist or could not be contacted"

How do I figure out how my "LDAP://" should look like?

Thanks,

Phin

Nov 17 '05 #2
That function is probably failing because the SearchRoot used by the
DirectorySearcher needs to be built with a specific server name and login
credentials, much like the bind operation you did to authenticate the user
in the first place.

If you replace the line:

Dim search As DirectorySearcher = New DirectorySearcher(_path)

with:
Dim search As DirectorySearcher = New DirectorySearcher(rootEntry)

Where rootEntry is a DirectoryEntry object built the same way you built the
entry to get the authentication to work, then you should be fine.

That said, in my opinion this example from Microsoft is very flawed and
probably should not be used. Using memberOf does not give you nested group
membership, does not ensure that the groups are security groups and does not
include the user's primary group. A much better solution is to use the
tokenGroups attribute on the current user to get their full transitive
security group membership. The trick is that this attribute returns an
array of SID structures as byte(), so they are a bit harder to resolve back
into names (but certainly not impossible).

Normally, you are interested in the group names if you want to build an
IPrincipal object in order to make role-based authorization decisions. If a
simple authentication (in or out of the site) is adequate for your needs,
then you could easily just skip this whole mess and be done with it.
Normally, you need role-based authorization if certain users are allowed to
perform certain actions that others are not and you need an easy way to
distinguish them at runtime.

I hope that helps,

Joe K.

"mrwoopey" <mr******@yahoo.com> wrote in message
news:e4**************************@posting.google.c om...
Hi Marc,

Thanks for the tip, it worked! The thing that doesn't work now is
trying to find the group that the user is in ("Error obtaining group
names"). So, I commented out the code "adAuth.GetGroups()". Does
anybody know how to get "adAuth.GetGroups()" working from the example:

http://support.microsoft.com/default...B;EN-US;326340

Besides that I can log in. Do I really need to check for group name?

Thanks,

Phin

"Marc Nivens [MSFT]" <ma***@online.microsoft.com> wrote in message

news:<O3**************@tk2msftngp13.phx.gbl>...
DC= should be followed by a domain DN, not a servername. If you want to
bind to DC1 in domain domain.com, you would use this:

LDAP://DC1/DC=domain,DC=com

If you use serverless binding, you would just use:

LDAP://DC=domain,DC=com

--
Marc Nivens
Enterprise Messaging Support

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"mrwoopey" <mr******@yahoo.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

I am using the example "Authenticate against the Active Directory by
Using Forms Authentication and Visual Basic .NET":

http://support.microsoft.com/default...B;EN-US;326340

But I am having a problem figuring out the LDAP://

The LDAP:// that I pass looks like this (i substitued generic the
following with generic name):

Dim adPath as String =
LDAP://DC=SomeDomainControllerComputerThatHasActiveDirect ory"

But I am receiveing the following message when I try to log in with
the example:
"Error authenticating. Error authenticating user. The specified domain
either does not exist or could not be contacted"

How do I figure out how my "LDAP://" should look like?

Thanks,

Phin

Nov 17 '05 #3
Joe,

Thanks for your input. I'll try it!

thanks,

Phin
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kevin | last post by:
Help, I am running a pass through query to oracle from SQL server 2000 as follows; select * from openquery(nbsp, 'select * from FND_FLEX_VALUES') I have run this query through both DTS and...
5
by: RodneyDunes | last post by:
My site did validate and now it doesn't. The error I get is the following: document type does not allow element "META" here ....nt-type" content="text/html;charset=iso-8859-1"> Can someone...
2
by: narasingarao | last post by:
Hi to group, I'm a student of M.C.A. from B.I.T. Ranchi...I'm in my project period here i have to migrate the MS-Access database table to Oracle data base tables...so, please help me in getting...
0
by: Kevin Buchan | last post by:
I have some code to query Active Directory group membership, based on an LDAP path. This works beautifully in my test exectuable, but when I try to move the class I built into an ASP.Net web...
1
by: Brad | last post by:
I'm trying to use Active Directory to retrieve information for a user...for display purposes.. I am not using windows authentication or impersonation....I am using a fixed user id and password for...
0
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
0
by: Nandagopal | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and C#": But I am having a problem figuring out the LDAP:// The LDAP:// that I pass looks...
2
by: shalong | last post by:
Hi all, VS 2008 is complaining that HttpWebRequest class is not in System.Net namespace I have referenced System.Net and have coded "using System.Net" I think its a setup problem rather than a...
5
by: Mandyrjs | last post by:
hi im new to php and i want to code a admin login page where i want to match the values from the login form with the values of the database table.....when i run the login page after entering the user...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.