473,499 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

query AD - Domain does not exist error

Dim subtree As New DirectoryEntry(ADRootQueryString, "domain\loginame",
"Password1", AuthenticationTypes.Secure)
If validCharacters.Match(name).Success Then
rootPath = String.Format(ADDefaultContextQueryString, _
subtree.Properties("defaultNamingContext").Value.T oString)
filter = String.Format(ADPathQueryString, name)

Dim search As New DirectorySearcher
'Error at the this line
search.SearchRoot.Path = rootPath
summaryResults = Find(rootPath, filter)
end if

I am trying to query the AD on a localhost project and have valid login
details for that AD, it seems as thought it does not like my
credentials, I get the error : "The specified domain either does not
exist or could not be contacted" on line
search.SearchRoot.Path = rootPath
Any suggestions?

May 28 '06 #1
1 1470

"j-in-uk" <je******@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
| Dim subtree As New DirectoryEntry(ADRootQueryString, "domain\loginame",
| "Password1", AuthenticationTypes.Secure)
| If validCharacters.Match(name).Success Then
| rootPath = String.Format(ADDefaultContextQueryString, _
| subtree.Properties("defaultNamingContext").Value.T oString)
| filter = String.Format(ADPathQueryString, name)
|
| Dim search As New DirectorySearcher
| 'Error at the this line
| search.SearchRoot.Path = rootPath
| summaryResults = Find(rootPath, filter)
| end if
|
| I am trying to query the AD on a localhost project and have valid login
| details for that AD, it seems as thought it does not like my
| credentials, I get the error : "The specified domain either does not
| exist or could not be contacted" on line
| search.SearchRoot.Path = rootPath
| Any suggestions?
|

It makes no sense to post incomplete (VB)code samples to a CSharp NG, all we
can do is guess how the missing parts look like. Now, my best guess is that
you are trying to bind to the "RootDSE", while you are logged on locally.
For this to work you need to logon into a domain for which you try to bind
to it's root.

Willy.

May 29 '06 #2

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

Similar topics

2
7859
by: Ammar | last post by:
I've defined a linked ADSI server and I seem to be able to query the local domain ( localdomain.com ) with: DBCC TRACEON(7300) GO SELECT * FROM OPENQUERY(ADSI, 'SELECT displayName FROM...
0
1666
by: Oliver | last post by:
Hello, (I posted about this a few weeks agao, but got no response. I've tried some more stuff since then...) I’ve written a Visual basic .NET program that need to create a new .DBF file...
3
16418
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 ...
1
4149
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...
1
1417
by: Sanmic | last post by:
I've made an .aspx page for managing Exchange 2000 mailboxes. Everything works fine when I uses "identity impersonate" in my web.config. If I disable Anonymous access in IIS and removes "identity...
1
1764
by: Tash | last post by:
I am having a weird problem. I am trying to use the following code to query active directory. Function IsExistInAD(ByVal loginName As String) As Boolean Dim userName As String =...
2
14551
by: Mario | last post by:
Hi, i am new on VB .net and i want to list all Active Directory Users in a WebInterface. It is no problem in Windows Applications to list users, but in Web Application i allay get the following...
1
1934
by: ouistyty | last post by:
Hi We have a simple asp page that query LDAP attribrute. Everithing is working fine using a native domain account. but when using an external account we have an error 70, acces denie. Here's...
1
4951
by: Magnus R | last post by:
In VB.Net I'm trying to find out the names of what Administrative Groups exist by querying Active Directory. The problem is when I try and query the children of the key LDAP://CN=Administrative...
0
7134
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,...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7395
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
4921
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
4609
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
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
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
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.