473,385 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

DirectorySearcher maintains active TCP LDAP connection

I am writing a little program in vb.net to return a collections of AD
properties to validate some information in AD. I'm noticing something
strange in that I cannot get my program to release the LDAP connection after
it's done doing what it needs to do. It will only close the connection when
the application is completely closed. I'm verifying the actual TCP
connection using TCPView from www.sysinternals.com.

As soon as I create the directorySearcher object (dirSearcher = new
directorySearcher(dirEntry)), the connection is made to my server.

I'm using a try, catch, finally block. In my finally section, I'm trying
dirEntry.close and dirSearcher.dispose, but the LDAP connection persists.
I've even gone as far as adding gc.collect to force a collection after I
close/dispose, but that had no effect either.

Am I missing something really easy here or is this a potential bug? I can't
see this as correct functionality as once an object is disposed/closed, the
connection it used should also close.

Further info: I use one directory entry, and one directory searcher object
based on the dirEntry. I do all my work from the actual search results
instead of creating additional dirEntries for each object returned in my
collection. This is strictly a directorySearch. I'm not doing any
additional functionality to the returned objects themselves, thus not
requiring the additional directory entries.

TIA!
Jan 3 '08 #1
0 1283

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

Similar topics

3
by: Hermes | last post by:
Hi all, We have a web page which validates users againt active directory (kinda), Effectively the code we use will check the user's password and if successful creates some session's for what...
0
by: microsoft | last post by:
Hi People, when I try to modify an active directory user programatically, I receive the following exception: The server is unwilling to process the request Reading the microsoft web site, I...
3
by: Zeno Lee | last post by:
I'm trying to authenticate a user against a windows network. I want it to work across any kind of windows network from NT 4.0 up to Windows 2003 ADS. So far I've been using DirectoryEntry and...
4
by: cameron | last post by:
I have always been under the impression that LDAP was optimized for speed. Fast queries, fast access, slower writes. I have a block of data in LDAP and in SQL. Exact same data. The query is fast...
1
by: Jay | last post by:
I need to add a parameter to a directorysearcher.filter rather than using hard-coded text. I have the following code that finds all members of an AD group and then for each of those results tries...
7
by: kooch54 | last post by:
I am trying to write a script to simply query the group members in an active directory group. I need to use LDAP to make sure I capture any global global group nestings that may occur. I already...
0
by: bcanter | last post by:
I found a file on the web that will allow you to enumerate groups but it was an .hta and the top level admins won't allow this. I need to give managers access to the groups so that when a new user is...
0
by: LiQuick | last post by:
Dear Reader, When I try to run the following LDAP filter with the DirectorySearcher it doesn't return any OU's but when I use it with Active Directory Users and Computers it returns the desired...
2
by: Jim in Arizona | last post by:
I'm trying to do a check to see if a specific active directory user account exists in active directory AND a specific group. I can't seem to get the filter down right. I can do this to find a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.