473,486 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 16417
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
7440
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
12074
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
5881
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
1555
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
4148
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
3391
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
1186
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
16369
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
2845
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
7099
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7319
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4864
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.