Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

 

When subscribed to the list you should use your standard email client to send your posts to ActiveDir@mail.activedir.org.

List Archives

Subject: [ActiveDir] Issues with System.DirectoryServices
Prev Next
You are not authorized to post a reply.

Page 1 of 212 > >>
AuthorMessages
josephisenhourUser is Offline

Posts:0

05/08/2007 7:51 AM  
Issues with System.DirectoryServices


I have a web app that I'm developing that seems to having issues with System.DirectoryServices. The app uses S.DS pretty heavily and it plugs along just fine for a while but then all of the sudden anything that calls S.DS simply fails. I then have to restart IIS in order for it to begin working again. I'm assuming that I'm using up some resource within S.DS and never freeing it; however, I don't know of any good way to figure out which resource I'm exausting.

I've gone through and looked at all of my DirectoryEntry and DirectorySearcher objects and have ensured that I'm calling .Close and .Dispose when I'm done with them. It's possible that I'm leaving the objects open but I don't really know how to tell. Does anyone know of a good tool or method that I can use to troubleshoot S.DS?
dunnryUser is Offline

Posts:0

05/08/2007 8:03 AM  
You should check your memory profile using Perfmon or even task
manager to see what the process is consuming. If it is pretty high,
you might have missed cleaning up a few of the DirectoryEntry or
SearchResultCollection objects. This can especially happen if you
don't guarantee the Dispose to be called by using a 'finally'
statement or a 'using' statement. That is, you get one error that
jumps past your Dispose and you might just leak the object.

Next, you can use a tool like TCPView from Sysinternals (now part of
MS Technet) to view open connections on the machine. If you see a ton
open when the app starts crapping out on you, it means that you have
defeating connection pooling somehow or you are again not cleaning up
connections.

The best way to ensure you are cleaning things up is to wrap your
stuff in a 'using' statement. Note that the Close method is pretty
similar to the Dispose method (a very subtle difference actually as
one throws an error on reuse and the other doesn't). We generally
recommend to just use Dispose and be done with it. This is taken care
of for you by using the 'using' statement automagically.

We might be able to help you troubleshoot the failure more
specifically if you can tell us what the error message is when it
starts to fail.

On 5/8/07, Isenhour, Joseph wrote:
>
>
>
> I have a web app that I'm developing that seems to having issues with
> System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> along just fine for a while but then all of the sudden anything that calls
> S.DS simply fails. I then have to restart IIS in order for it to begin
> working again. I'm assuming that I'm using up some resource within S.DS and
> never freeing it; however, I don't know of any good way to figure out which
> resource I'm exausting.
>
> I've gone through and looked at all of my DirectoryEntry and
> DirectorySearcher objects and have ensured that I'm calling .Close and
> .Dispose when I'm done with them. It's possible that I'm leaving the
> objects open but I don't really know how to tell. Does anyone know of a
> good tool or method that I can use to troubleshoot S.DS?
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
dunnryUser is Offline

Posts:0

05/08/2007 8:25 AM  
Oh, I should also mention that anytime you access a method or property
that returns a DirectoryEntry, you are also responsible for disposing
of it. This can be a gotcha. So this code might leak:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;
//do something with Parent
entry.Dispose(); //what about parent?

Here is an even more insidious one:

Console.WriteLine(entry.Parent.Path);

Most people will forget to call entry.Parent.Dispose() since it is not
a local variable.

How to fix:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;

using (entry)
using (parent)
{
// do stuff
}// both are disposed here for you...

Remember, this applies to *any* method or Property that returns a
DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
and also DirectoryEntry.Children.Add for instance.

On 5/8/07, Isenhour, Joseph wrote:
>
>
>
> I have a web app that I'm developing that seems to having issues with
> System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> along just fine for a while but then all of the sudden anything that calls
> S.DS simply fails. I then have to restart IIS in order for it to begin
> working again. I'm assuming that I'm using up some resource within S.DS and
> never freeing it; however, I don't know of any good way to figure out which
> resource I'm exausting.
>
> I've gone through and looked at all of my DirectoryEntry and
> DirectorySearcher objects and have ensured that I'm calling .Close and
> .Dispose when I'm done with them. It's possible that I'm leaving the
> objects open but I don't really know how to tell. Does anyone know of a
> good tool or method that I can use to troubleshoot S.DS?
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
listmailUser is Offline

Posts:822

05/08/2007 10:43 AM  
WHAT!!! That's outrageous, if I am using .NET it is supposed to be handling
all of my garbage collection for me automatically!!!! I use because I don't
want to track all of that stuff or I don't know how to track that stuff or
some other reason!!!

;o)

That tire gets flatter little by little.
--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm


-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
Sent: Tuesday, May 08, 2007 8:25 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

Oh, I should also mention that anytime you access a method or property
that returns a DirectoryEntry, you are also responsible for disposing
of it. This can be a gotcha. So this code might leak:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;
//do something with Parent
entry.Dispose(); //what about parent?

Here is an even more insidious one:

Console.WriteLine(entry.Parent.Path);

Most people will forget to call entry.Parent.Dispose() since it is not
a local variable.

How to fix:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;

using (entry)
using (parent)
{
// do stuff
}// both are disposed here for you...

Remember, this applies to *any* method or Property that returns a
DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
and also DirectoryEntry.Children.Add for instance.

On 5/8/07, Isenhour, Joseph wrote:
>
>
>
> I have a web app that I'm developing that seems to having issues with
> System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> along just fine for a while but then all of the sudden anything that calls
> S.DS simply fails. I then have to restart IIS in order for it to begin
> working again. I'm assuming that I'm using up some resource within S.DS
and
> never freeing it; however, I don't know of any good way to figure out
which
> resource I'm exausting.
>
> I've gone through and looked at all of my DirectoryEntry and
> DirectorySearcher objects and have ensured that I'm calling .Close and
> .Dispose when I'm done with them. It's possible that I'm leaving the
> objects open but I don't really know how to tell. Does anyone know of a
> good tool or method that I can use to troubleshoot S.DS?
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
joeUser is Offline

Posts:106

05/08/2007 10:44 AM  
Another thing that can happen here is the dreaded ADSI connection caching
issue where you run out of wild card ports. If netstat shows a lot of ports
sitting in "time wait" status, that could be the issue. This is often the
problem when you see somewhat random ADSI failures in code that was working
fine before but where many ADSI calls were being made.

Joe K.

----- Original Message -----
From: "Ryan Dunn"
To:
Sent: Tuesday, May 08, 2007 7:25 PM
Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> Oh, I should also mention that anytime you access a method or property
> that returns a DirectoryEntry, you are also responsible for disposing
> of it. This can be a gotcha. So this code might leak:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
> //do something with Parent
> entry.Dispose(); //what about parent?
>
> Here is an even more insidious one:
>
> Console.WriteLine(entry.Parent.Path);
>
> Most people will forget to call entry.Parent.Dispose() since it is not
> a local variable.
>
> How to fix:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
>
> using (entry)
> using (parent)
> {
> // do stuff
> }// both are disposed here for you...
>
> Remember, this applies to *any* method or Property that returns a
> DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> and also DirectoryEntry.Children.Add for instance.
>
>
>
> On 5/8/07, Isenhour, Joseph wrote:
>>
>>
>>
>> I have a web app that I'm developing that seems to having issues with
>> System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
>> along just fine for a while but then all of the sudden anything that
>> calls
>> S.DS simply fails. I then have to restart IIS in order for it to begin
>> working again. I'm assuming that I'm using up some resource within S.DS
>> and
>> never freeing it; however, I don't know of any good way to figure out
>> which
>> resource I'm exausting.
>>
>> I've gone through and looked at all of my DirectoryEntry and
>> DirectorySearcher objects and have ensured that I'm calling .Close and
>> .Dispose when I'm done with them. It's possible that I'm leaving the
>> objects open but I don't really know how to tell. Does anyone know of a
>> good tool or method that I can use to troubleshoot S.DS?
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
darrenUser is Offline

Posts:386

05/08/2007 11:24 AM  
Joe-
You're kinda talking apples and oranges. Just because you have a garbage
collection system does not mean that object references that get orphaned or
are otherwise held too long will always get garbage collected. Its just good
code practice to finalize objects to make sure they get cleaned up. Its
still easier, frankly, than pointer gymnastics...

Darren
-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of joe
Sent: Tuesday, May 08, 2007 7:44 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Issues with System.DirectoryServices

WHAT!!! That's outrageous, if I am using .NET it is supposed to be handling
all of my garbage collection for me automatically!!!! I use because I don't
want to track all of that stuff or I don't know how to track that stuff or
some other reason!!!

;o)

That tire gets flatter little by little.
--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm


-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
Sent: Tuesday, May 08, 2007 8:25 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

Oh, I should also mention that anytime you access a method or property
that returns a DirectoryEntry, you are also responsible for disposing
of it. This can be a gotcha. So this code might leak:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;
//do something with Parent
entry.Dispose(); //what about parent?

Here is an even more insidious one:

Console.WriteLine(entry.Parent.Path);

Most people will forget to call entry.Parent.Dispose() since it is not
a local variable.

How to fix:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;

using (entry)
using (parent)
{
// do stuff
}// both are disposed here for you...

Remember, this applies to *any* method or Property that returns a
DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
and also DirectoryEntry.Children.Add for instance.

On 5/8/07, Isenhour, Joseph wrote:
>
>
>
> I have a web app that I'm developing that seems to having issues with
> System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> along just fine for a while but then all of the sudden anything that calls
> S.DS simply fails. I then have to restart IIS in order for it to begin
> working again. I'm assuming that I'm using up some resource within S.DS
and
> never freeing it; however, I don't know of any good way to figure out
which
> resource I'm exausting.
>
> I've gone through and looked at all of my DirectoryEntry and
> DirectorySearcher objects and have ensured that I'm calling .Close and
> .Dispose when I'm done with them. It's possible that I'm leaving the
> objects open but I don't really know how to tell. Does anyone know of a
> good tool or method that I can use to troubleshoot S.DS?
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
dunnryUser is Offline

Posts:0

05/08/2007 11:42 AM  
I know you are being facetious, but... it actually almost works like
that - except in the case where .NET holds references to unmanaged
objects. In the case of SDS, it is the IADs and its ilk that causes
problems. We can almost get away with it even the... because of the
Finalizers, but alas they are non-deterministic so we should never
rely on that behavior.

I guess my point is: don't knock the managed memory too much. It
certainly won't protect you from everything, but it will take care of
most of the code you might write using .NET primitives.

I know JoeK has been trying to get you to convert... and I would
seriously recommend you try it out too (you can always go back). My
guess however is that once you go managed, you just won't look back.
.NET is the schiz-nitz...

On 5/8/07, joe wrote:
> WHAT!!! That's outrageous, if I am using .NET it is supposed to be handling
> all of my garbage collection for me automatically!!!! I use because I don't
> want to track all of that stuff or I don't know how to track that stuff or
> some other reason!!!
>
> ;o)
>
> That tire gets flatter little by little.
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> Sent: Tuesday, May 08, 2007 8:25 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> Oh, I should also mention that anytime you access a method or property
> that returns a DirectoryEntry, you are also responsible for disposing
> of it. This can be a gotcha. So this code might leak:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
> //do something with Parent
> entry.Dispose(); //what about parent?
>
> Here is an even more insidious one:
>
> Console.WriteLine(entry.Parent.Path);
>
> Most people will forget to call entry.Parent.Dispose() since it is not
> a local variable.
>
> How to fix:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
>
> using (entry)
> using (parent)
> {
> // do stuff
> }// both are disposed here for you...
>
> Remember, this applies to *any* method or Property that returns a
> DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> and also DirectoryEntry.Children.Add for instance.
>
>
>
> On 5/8/07, Isenhour, Joseph wrote:
> >
> >
> >
> > I have a web app that I'm developing that seems to having issues with
> > System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> > along just fine for a while but then all of the sudden anything that calls
> > S.DS simply fails. I then have to restart IIS in order for it to begin
> > working again. I'm assuming that I'm using up some resource within S.DS
> and
> > never freeing it; however, I don't know of any good way to figure out
> which
> > resource I'm exausting.
> >
> > I've gone through and looked at all of my DirectoryEntry and
> > DirectorySearcher objects and have ensured that I'm calling .Close and
> > .Dispose when I'm done with them. It's possible that I'm leaving the
> > objects open but I don't really know how to tell. Does anyone know of a
> > good tool or method that I can use to troubleshoot S.DS?
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
listmailUser is Offline

Posts:822

05/08/2007 11:48 AM  
Shhhhhh.

Think of it as bar talk, at about 1AM. :)
--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm


-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Darren Mar-Elia
Sent: Tuesday, May 08, 2007 11:24 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Issues with System.DirectoryServices

Joe-
You're kinda talking apples and oranges. Just because you have a garbage
collection system does not mean that object references that get orphaned or
are otherwise held too long will always get garbage collected. Its just good
code practice to finalize objects to make sure they get cleaned up. Its
still easier, frankly, than pointer gymnastics...

Darren
-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of joe
Sent: Tuesday, May 08, 2007 7:44 PM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Issues with System.DirectoryServices

WHAT!!! That's outrageous, if I am using .NET it is supposed to be handling
all of my garbage collection for me automatically!!!! I use because I don't
want to track all of that stuff or I don't know how to track that stuff or
some other reason!!!

;o)

That tire gets flatter little by little.
--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm


-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
Sent: Tuesday, May 08, 2007 8:25 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

Oh, I should also mention that anytime you access a method or property
that returns a DirectoryEntry, you are also responsible for disposing
of it. This can be a gotcha. So this code might leak:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;
//do something with Parent
entry.Dispose(); //what about parent?

Here is an even more insidious one:

Console.WriteLine(entry.Parent.Path);

Most people will forget to call entry.Parent.Dispose() since it is not
a local variable.

How to fix:

DirectoryEntry entry = new DirectoryEntry(...);
DirectoryEntry parent = entry.Parent;

using (entry)
using (parent)
{
// do stuff
}// both are disposed here for you...

Remember, this applies to *any* method or Property that returns a
DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
and also DirectoryEntry.Children.Add for instance.

On 5/8/07, Isenhour, Joseph wrote:
>
>
>
> I have a web app that I'm developing that seems to having issues with
> System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> along just fine for a while but then all of the sudden anything that calls
> S.DS simply fails. I then have to restart IIS in order for it to begin
> working again. I'm assuming that I'm using up some resource within S.DS
and
> never freeing it; however, I don't know of any good way to figure out
which
> resource I'm exausting.
>
> I've gone through and looked at all of my DirectoryEntry and
> DirectorySearcher objects and have ensured that I'm calling .Close and
> .Dispose when I'm done with them. It's possible that I'm leaving the
> objects open but I don't really know how to tell. Does anyone know of a
> good tool or method that I can use to troubleshoot S.DS?
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
listmailUser is Offline

Posts:822

05/08/2007 11:57 AM  
Ahhhhh no. :)

If I do it at all it will C# for web pages so all server side and I control
what is and isn't available on that server. I don't see myself producing
.FAT client stuff until it is guaranteed to be available everywhere someone
could possibly decide to use some of my utilities. Even then, my fear in
seeing how slow things like LiveWriter are makes me think I will never go
that way. If I could compile the stuff to native code, I might consider it
now though the KBs that say don't use managed code for any of the key system
stuff just waves me off again and again.

But on a serious note though going back to the handling of things or getting
leaks... I wonder how many people are being bitten by that? I was being sort
of facetious but serious at the same time, MSFT is selling .NET, at least in
part from what I have seen on the back of "hey you don't have to worry about
all that crazy pointer and releasing memory business" yet it isn't
consistent. That is worse, IMO, than not doing it at all because someone who
thinks they are always safe isn't going to look as hard for issues as
someone who is always in danger if they don't watch for it.

joe
--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm


-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
Sent: Tuesday, May 08, 2007 11:42 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

I know you are being facetious, but... it actually almost works like
that - except in the case where .NET holds references to unmanaged
objects. In the case of SDS, it is the IADs and its ilk that causes
problems. We can almost get away with it even the... because of the
Finalizers, but alas they are non-deterministic so we should never
rely on that behavior.

I guess my point is: don't knock the managed memory too much. It
certainly won't protect you from everything, but it will take care of
most of the code you might write using .NET primitives.

I know JoeK has been trying to get you to convert... and I would
seriously recommend you try it out too (you can always go back). My
guess however is that once you go managed, you just won't look back.
.NET is the schiz-nitz...

On 5/8/07, joe wrote:
> WHAT!!! That's outrageous, if I am using .NET it is supposed to be
handling
> all of my garbage collection for me automatically!!!! I use because I
don't
> want to track all of that stuff or I don't know how to track that stuff or
> some other reason!!!
>
> ;o)
>
> That tire gets flatter little by little.
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> Sent: Tuesday, May 08, 2007 8:25 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> Oh, I should also mention that anytime you access a method or property
> that returns a DirectoryEntry, you are also responsible for disposing
> of it. This can be a gotcha. So this code might leak:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
> //do something with Parent
> entry.Dispose(); //what about parent?
>
> Here is an even more insidious one:
>
> Console.WriteLine(entry.Parent.Path);
>
> Most people will forget to call entry.Parent.Dispose() since it is not
> a local variable.
>
> How to fix:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
>
> using (entry)
> using (parent)
> {
> // do stuff
> }// both are disposed here for you...
>
> Remember, this applies to *any* method or Property that returns a
> DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> and also DirectoryEntry.Children.Add for instance.
>
>
>
> On 5/8/07, Isenhour, Joseph wrote:
> >
> >
> >
> > I have a web app that I'm developing that seems to having issues with
> > System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> > along just fine for a while but then all of the sudden anything that
calls
> > S.DS simply fails. I then have to restart IIS in order for it to begin
> > working again. I'm assuming that I'm using up some resource within S.DS
> and
> > never freeing it; however, I don't know of any good way to figure out
> which
> > resource I'm exausting.
> >
> > I've gone through and looked at all of my DirectoryEntry and
> > DirectorySearcher objects and have ensured that I'm calling .Close and
> > .Dispose when I'm done with them. It's possible that I'm leaving the
> > objects open but I don't really know how to tell. Does anyone know of a
> > good tool or method that I can use to troubleshoot S.DS?
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
josephisenhourUser is Offline

Posts:0

05/09/2007 1:31 AM  
I'm actually seeing around 80 LDAP connections. The app is talking to 6
different forests so I'd expect to see around 6 to 10 connections.

The app is a C# web form so many users will be hitting it at any given
time. Right now I'm the only one hitting it and it's taking 80
connections. Is there anyway to ensure that the connections either get
re-used or at least get closed imediatley after the objects are
disposed?

-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
Sent: Tuesday, May 08, 2007 7:45 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

Another thing that can happen here is the dreaded ADSI connection
caching issue where you run out of wild card ports. If netstat shows a
lot of ports sitting in "time wait" status, that could be the issue.
This is often the problem when you see somewhat random ADSI failures in
code that was working fine before but where many ADSI calls were being
made.

Joe K.

----- Original Message -----
From: "Ryan Dunn"
To:
Sent: Tuesday, May 08, 2007 7:25 PM
Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> Oh, I should also mention that anytime you access a method or property
> that returns a DirectoryEntry, you are also responsible for disposing
> of it. This can be a gotcha. So this code might leak:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
> //do something with Parent
> entry.Dispose(); //what about parent?
>
> Here is an even more insidious one:
>
> Console.WriteLine(entry.Parent.Path);
>
> Most people will forget to call entry.Parent.Dispose() since it is not
> a local variable.
>
> How to fix:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
>
> using (entry)
> using (parent)
> {
> // do stuff
> }// both are disposed here for you...
>
> Remember, this applies to *any* method or Property that returns a
> DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> and also DirectoryEntry.Children.Add for instance.
>
>
>
> On 5/8/07, Isenhour, Joseph wrote:
>>
>>
>>
>> I have a web app that I'm developing that seems to having issues with
>> System.DirectoryServices. The app uses S.DS pretty heavily and it
plugs
>> along just fine for a while but then all of the sudden anything that
>> calls
>> S.DS simply fails. I then have to restart IIS in order for it to
begin
>> working again. I'm assuming that I'm using up some resource within
S.DS
>> and
>> never freeing it; however, I don't know of any good way to figure out

>> which
>> resource I'm exausting.
>>
>> I've gone through and looked at all of my DirectoryEntry and
>> DirectorySearcher objects and have ensured that I'm calling .Close
and
>> .Dispose when I'm done with them. It's possible that I'm leaving the
>> objects open but I don't really know how to tell. Does anyone know
of a
>> good tool or method that I can use to troubleshoot S.DS?
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
dunnryUser is Offline

Posts:0

05/09/2007 2:15 AM  
We need more information here. How are you creating the connections?
For example, show us how you are constructing your DirectoryEntry
objects. What is the security context of the application? the
user's? a trusted subsystem? impersonated?

On 5/9/07, Isenhour, Joseph wrote:
> I'm actually seeing around 80 LDAP connections. The app is talking to 6
> different forests so I'd expect to see around 6 to 10 connections.
>
> The app is a C# web form so many users will be hitting it at any given
> time. Right now I'm the only one hitting it and it's taking 80
> connections. Is there anyway to ensure that the connections either get
> re-used or at least get closed imediatley after the objects are
> disposed?
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
> Sent: Tuesday, May 08, 2007 7:45 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> Another thing that can happen here is the dreaded ADSI connection
> caching issue where you run out of wild card ports. If netstat shows a
> lot of ports sitting in "time wait" status, that could be the issue.
> This is often the problem when you see somewhat random ADSI failures in
> code that was working fine before but where many ADSI calls were being
> made.
>
> Joe K.
>
> ----- Original Message -----
> From: "Ryan Dunn"
> To:
> Sent: Tuesday, May 08, 2007 7:25 PM
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
>
> > Oh, I should also mention that anytime you access a method or property
> > that returns a DirectoryEntry, you are also responsible for disposing
> > of it. This can be a gotcha. So this code might leak:
> >
> > DirectoryEntry entry = new DirectoryEntry(...);
> > DirectoryEntry parent = entry.Parent;
> > //do something with Parent
> > entry.Dispose(); //what about parent?
> >
> > Here is an even more insidious one:
> >
> > Console.WriteLine(entry.Parent.Path);
> >
> > Most people will forget to call entry.Parent.Dispose() since it is not
> > a local variable.
> >
> > How to fix:
> >
> > DirectoryEntry entry = new DirectoryEntry(...);
> > DirectoryEntry parent = entry.Parent;
> >
> > using (entry)
> > using (parent)
> > {
> > // do stuff
> > }// both are disposed here for you...
> >
> > Remember, this applies to *any* method or Property that returns a
> > DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> > and also DirectoryEntry.Children.Add for instance.
> >
> >
> >
> > On 5/8/07, Isenhour, Joseph wrote:
> >>
> >>
> >>
> >> I have a web app that I'm developing that seems to having issues with
> >> System.DirectoryServices. The app uses S.DS pretty heavily and it
> plugs
> >> along just fine for a while but then all of the sudden anything that
> >> calls
> >> S.DS simply fails. I then have to restart IIS in order for it to
> begin
> >> working again. I'm assuming that I'm using up some resource within
> S.DS
> >> and
> >> never freeing it; however, I don't know of any good way to figure out
>
> >> which
> >> resource I'm exausting.
> >>
> >> I've gone through and looked at all of my DirectoryEntry and
> >> DirectorySearcher objects and have ensured that I'm calling .Close
> and
> >> .Dispose when I'm done with them. It's possible that I'm leaving the
> >> objects open but I don't really know how to tell. Does anyone know
> of a
> >> good tool or method that I can use to troubleshoot S.DS?
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
joeUser is Offline

Posts:106

05/09/2007 11:25 AM  
This is important stuff to know. If there are different user identities
accessing the directory, ADSI will open up a new connection for each one.
That is by design and is just the way that ADSI works. That makes it
difficult to get lots of scalability with apps that use an impersonation
model.

However, if he's seeing 80 connections for just one user when the
expectation is that there are only 6 forests to connect to, that would seem
to indicate that connections aren't getting reused and connection caching
isn't working as expected. That could cause problems.

Ryan suggested earlier to make sure the Dispose is being called religiously
so that the underlying ADSI objects are being cleaned up right when you are
done with them and not waiting around for garbage collection. This is a
good idea, although not as important as it was in .NET 1.x where there were
bugs that caused ADSI COM objects to not get cleaned up if you failed to
call Dispose. At least now, the GC will eventually get around to it, just
maybe not as quickly as you'd like.

However, the downside of calling Dispose or Close is that if no other ADSI
objects are also using that LDAP connection, it will close it. In general
that is a good thing because you want your connections closed when you are
done with them. The problem comes in when moments later, a new web request
comes in the site code causes new connections to be opened instead of
reusing one that is already open. If the opening and closing happens over
and over again, you'll eventually run out of TCP wildcard ports and will get
errors. This is because once the TCP port closes, it will sit in "time
wait" for 60 seconds and won't be available for new connections until it
releases.

It isn't totally clear to me that this is the issue, but it sounds like it
might be. It is pretty difficult to diagnose in my experience.

One thing you can do programmatically to try to make sure your LDAP
connections stay open so that ADSI will reuse them. If you use a single set
of credentials for all of your access, then you can sometimes accomplish
this by opening up connections in something like the application_start even
and sticking the DirectoryEntry objects into static variables or something
so they won't be collected.

I hope that helps a bit more.

Joe K.

----- Original Message -----
From: "Ryan Dunn"
To:
Sent: Wednesday, May 09, 2007 1:15 PM
Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> We need more information here. How are you creating the connections?
> For example, show us how you are constructing your DirectoryEntry
> objects. What is the security context of the application? the
> user's? a trusted subsystem? impersonated?
>
> On 5/9/07, Isenhour, Joseph wrote:
>> I'm actually seeing around 80 LDAP connections. The app is talking to 6
>> different forests so I'd expect to see around 6 to 10 connections.
>>
>> The app is a C# web form so many users will be hitting it at any given
>> time. Right now I'm the only one hitting it and it's taking 80
>> connections. Is there anyway to ensure that the connections either get
>> re-used or at least get closed imediatley after the objects are
>> disposed?
>>
>> -----Original Message-----
>> From: ActiveDir-owner@mail.activedir.org
>> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
>> Sent: Tuesday, May 08, 2007 7:45 PM
>> To: ActiveDir@mail.activedir.org
>> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>>
>> Another thing that can happen here is the dreaded ADSI connection
>> caching issue where you run out of wild card ports. If netstat shows a
>> lot of ports sitting in "time wait" status, that could be the issue.
>> This is often the problem when you see somewhat random ADSI failures in
>> code that was working fine before but where many ADSI calls were being
>> made.
>>
>> Joe K.
>>
>> ----- Original Message -----
>> From: "Ryan Dunn"
>> To:
>> Sent: Tuesday, May 08, 2007 7:25 PM
>> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>>
>>
>> > Oh, I should also mention that anytime you access a method or property
>> > that returns a DirectoryEntry, you are also responsible for disposing
>> > of it. This can be a gotcha. So this code might leak:
>> >
>> > DirectoryEntry entry = new DirectoryEntry(...);
>> > DirectoryEntry parent = entry.Parent;
>> > //do something with Parent
>> > entry.Dispose(); //what about parent?
>> >
>> > Here is an even more insidious one:
>> >
>> > Console.WriteLine(entry.Parent.Path);
>> >
>> > Most people will forget to call entry.Parent.Dispose() since it is not
>> > a local variable.
>> >
>> > How to fix:
>> >
>> > DirectoryEntry entry = new DirectoryEntry(...);
>> > DirectoryEntry parent = entry.Parent;
>> >
>> > using (entry)
>> > using (parent)
>> > {
>> > // do stuff
>> > }// both are disposed here for you...
>> >
>> > Remember, this applies to *any* method or Property that returns a
>> > DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
>> > and also DirectoryEntry.Children.Add for instance.
>> >
>> >
>> >
>> > On 5/8/07, Isenhour, Joseph wrote:
>> >>
>> >>
>> >>
>> >> I have a web app that I'm developing that seems to having issues with
>> >> System.DirectoryServices. The app uses S.DS pretty heavily and it
>> plugs
>> >> along just fine for a while but then all of the sudden anything that
>> >> calls
>> >> S.DS simply fails. I then have to restart IIS in order for it to
>> begin
>> >> working again. I'm assuming that I'm using up some resource within
>> S.DS
>> >> and
>> >> never freeing it; however, I don't know of any good way to figure out
>>
>> >> which
>> >> resource I'm exausting.
>> >>
>> >> I've gone through and looked at all of my DirectoryEntry and
>> >> DirectorySearcher objects and have ensured that I'm calling .Close
>> and
>> >> .Dispose when I'm done with them. It's possible that I'm leaving the
>> >> objects open but I don't really know how to tell. Does anyone know
>> of a
>> >> good tool or method that I can use to troubleshoot S.DS?
>> > List info : http://www.activedir.org/List.aspx
>> > List FAQ : http://www.activedir.org/ListFAQ.aspx
>> > List archive: http://www.activedir.org/ma/default.aspx
>>
>> List info : http://www.activedir.org/List.aspx
>> List FAQ : http://www.activedir.org/ListFAQ.aspx
>> List archive: http://www.activedir.org/ma/default.aspx
>> List info : http://www.activedir.org/List.aspx
>> List FAQ : http://www.activedir.org/ListFAQ.aspx
>> List archive: http://www.activedir.org/ma/default.aspx
>>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
bdesmondUser is Offline

Posts:977

05/09/2007 12:03 PM  
You should at least look at it for Winforms stuff - the third party controls (many of which you're entitled to through other channels) do a ton of stuff and I don't imagine you could easily replicate or procure much of that functionality for Borland's forms stuff.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-
> owner@mail.activedir.org] On Behalf Of joe
> Sent: Tuesday, May 08, 2007 11:48 PM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> Shhhhhh.
>
> Think of it as bar talk, at about 1AM. :)
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Darren Mar-
> Elia
> Sent: Tuesday, May 08, 2007 11:24 PM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> Joe-
> You're kinda talking apples and oranges. Just because you have a
> garbage
> collection system does not mean that object references that get
> orphaned or
> are otherwise held too long will always get garbage collected. Its just
> good
> code practice to finalize objects to make sure they get cleaned up. Its
> still easier, frankly, than pointer gymnastics...
>
> Darren
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of joe
> Sent: Tuesday, May 08, 2007 7:44 PM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> WHAT!!! That's outrageous, if I am using .NET it is supposed to be
> handling
> all of my garbage collection for me automatically!!!! I use because I
> don't
> want to track all of that stuff or I don't know how to track that stuff
> or
> some other reason!!!
>
> ;o)
>
> That tire gets flatter little by little.
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> Sent: Tuesday, May 08, 2007 8:25 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> Oh, I should also mention that anytime you access a method or property
> that returns a DirectoryEntry, you are also responsible for disposing
> of it. This can be a gotcha. So this code might leak:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
> //do something with Parent
> entry.Dispose(); //what about parent?
>
> Here is an even more insidious one:
>
> Console.WriteLine(entry.Parent.Path);
>
> Most people will forget to call entry.Parent.Dispose() since it is not
> a local variable.
>
> How to fix:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
>
> using (entry)
> using (parent)
> {
> // do stuff
> }// both are disposed here for you...
>
> Remember, this applies to *any* method or Property that returns a
> DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> and also DirectoryEntry.Children.Add for instance.
>
>
>
> On 5/8/07, Isenhour, Joseph wrote:
> >
> >
> >
> > I have a web app that I'm developing that seems to having issues with
> > System.DirectoryServices. The app uses S.DS pretty heavily and it
> plugs
> > along just fine for a while but then all of the sudden anything that
> calls
> > S.DS simply fails. I then have to restart IIS in order for it to
> begin
> > working again. I'm assuming that I'm using up some resource within
> S.DS
> and
> > never freeing it; however, I don't know of any good way to figure out
> which
> > resource I'm exausting.
> >
> > I've gone through and looked at all of my DirectoryEntry and
> > DirectorySearcher objects and have ensured that I'm calling .Close
> and
> > .Dispose when I'm done with them. It's possible that I'm leaving the
> > objects open but I don't really know how to tell. Does anyone know
> of a
> > good tool or method that I can use to troubleshoot S.DS?
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
dunnryUser is Offline

Posts:0

05/09/2007 12:19 PM  
Hmm... maybe I don't understand your motivation here. It seems to me
that a bytecode language is infinitely more portable than a compiled
native language. Right now, you target Win32 systems, but with .NET
(and Mono) you can hit almost all systems. It seems to me that your
reach extends with .NET, not the other way around. I know that you
need a runtime, but big deal... those are baked into new releases of
the Windows OS and are relatively minor downloads these days. Another
part of the confusion here is that .NET *is* compiled to native code -
so you might take a hit initially during the JIT, but it is pretty
fast on subsequent attempts. There is some overhead for the runtime
again, but it can be safely ignored in all but the most intensive
routines (image manipulation comes to mind here). Finally, there is
nothing stopping you from dropping into unmanaged code for those
intensive operations anyways, so you get the best of both worlds.
Tired arguments perhaps?... I don't think so.

As for the leaks in SDS, I would guess that it is pretty high. Joe
and I were pretty consistent in the book about teaching people to
clean up after themselves. However, there is not a lot of other
guidance out there that shows what happens if you don't. While .NET
makes your life a lot easier in terms of pointers and cleanup, you
still need practice good programming and to also understand your
technology (this is not .NET specific).

Remember, that part of this schism here is that we are taking .NET and
spackling it over ADSI right now (at least with SDS, but Protocols is
another story). ADSI is far from perfect (as you know). So any
problems there bubble right on up - including memory management. So,
using ADSI/SDS as a basis for judgment on .NET as a whole is not a
fair thing to do. ADSI is not perfect, so you really can't expect
someone a layer up to fix the layer below's problems. Taken as a
whole, I think you will find that .NET is a major step forward and has
many benefits that native compiled code doesn't. The only real
benefit to compiled native code is speed. While you will never be
able to outperform native code in all situations, you can come so
darn close that it is hardly worth talking about.

I am sure next time JoeK and I see you we will pound on you again
about .NET. I would be willing to bet that you would have been able
to write the same fine-grain policy program in less than half the time
it took you using .NET - with no performance penalty to boot. I know
JoeK or I could whip one up pretty easily. Since you have done it
already, it should be even faster. Why don't you give it a try using
.Protocols and then come back and tell me how much it sucks... :)

On 5/8/07, joe wrote:
> Ahhhhh no. :)
>
> If I do it at all it will C# for web pages so all server side and I control
> what is and isn't available on that server. I don't see myself producing
> .FAT client stuff until it is guaranteed to be available everywhere someone
> could possibly decide to use some of my utilities. Even then, my fear in
> seeing how slow things like LiveWriter are makes me think I will never go
> that way. If I could compile the stuff to native code, I might consider it
> now though the KBs that say don't use managed code for any of the key system
> stuff just waves me off again and again.
>
> But on a serious note though going back to the handling of things or getting
> leaks... I wonder how many people are being bitten by that? I was being sort
> of facetious but serious at the same time, MSFT is selling .NET, at least in
> part from what I have seen on the back of "hey you don't have to worry about
> all that crazy pointer and releasing memory business" yet it isn't
> consistent. That is worse, IMO, than not doing it at all because someone who
> thinks they are always safe isn't going to look as hard for issues as
> someone who is always in danger if they don't watch for it.
>
> joe
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> Sent: Tuesday, May 08, 2007 11:42 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> I know you are being facetious, but... it actually almost works like
> that - except in the case where .NET holds references to unmanaged
> objects. In the case of SDS, it is the IADs and its ilk that causes
> problems. We can almost get away with it even the... because of the
> Finalizers, but alas they are non-deterministic so we should never
> rely on that behavior.
>
> I guess my point is: don't knock the managed memory too much. It
> certainly won't protect you from everything, but it will take care of
> most of the code you might write using .NET primitives.
>
> I know JoeK has been trying to get you to convert... and I would
> seriously recommend you try it out too (you can always go back). My
> guess however is that once you go managed, you just won't look back.
> .NET is the schiz-nitz...
>
> On 5/8/07, joe wrote:
> > WHAT!!! That's outrageous, if I am using .NET it is supposed to be
> handling
> > all of my garbage collection for me automatically!!!! I use because I
> don't
> > want to track all of that stuff or I don't know how to track that stuff or
> > some other reason!!!
> >
> > ;o)
> >
> > That tire gets flatter little by little.
> >
> >
> > --
> > O'Reilly Active Directory Third Edition -
> > http://www.joeware.net/win/ad3e.htm
> >
> >
> > -----Original Message-----
> > From: ActiveDir-owner@mail.activedir.org
> > [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> > Sent: Tuesday, May 08, 2007 8:25 PM
> > To: ActiveDir@mail.activedir.org
> > Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> >
> > Oh, I should also mention that anytime you access a method or property
> > that returns a DirectoryEntry, you are also responsible for disposing
> > of it. This can be a gotcha. So this code might leak:
> >
> > DirectoryEntry entry = new DirectoryEntry(...);
> > DirectoryEntry parent = entry.Parent;
> > //do something with Parent
> > entry.Dispose(); //what about parent?
> >
> > Here is an even more insidious one:
> >
> > Console.WriteLine(entry.Parent.Path);
> >
> > Most people will forget to call entry.Parent.Dispose() since it is not
> > a local variable.
> >
> > How to fix:
> >
> > DirectoryEntry entry = new DirectoryEntry(...);
> > DirectoryEntry parent = entry.Parent;
> >
> > using (entry)
> > using (parent)
> > {
> > // do stuff
> > }// both are disposed here for you...
> >
> > Remember, this applies to *any* method or Property that returns a
> > DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> > and also DirectoryEntry.Children.Add for instance.
> >
> >
> >
> > On 5/8/07, Isenhour, Joseph wrote:
> > >
> > >
> > >
> > > I have a web app that I'm developing that seems to having issues with
> > > System.DirectoryServices. The app uses S.DS pretty heavily and it plugs
> > > along just fine for a while but then all of the sudden anything that
> calls
> > > S.DS simply fails. I then have to restart IIS in order for it to begin
> > > working again. I'm assuming that I'm using up some resource within S.DS
> > and
> > > never freeing it; however, I don't know of any good way to figure out
> > which
> > > resource I'm exausting.
> > >
> > > I've gone through and looked at all of my DirectoryEntry and
> > > DirectorySearcher objects and have ensured that I'm calling .Close and
> > > .Dispose when I'm done with them. It's possible that I'm leaving the
> > > objects open but I don't really know how to tell. Does anyone know of a
> > > good tool or method that I can use to troubleshoot S.DS?
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
> >
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
> >
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
listmailUser is Offline

Posts:822

05/09/2007 12:23 PM  
I think you would be shocked at how much is available out there for
Borland... Borland has been doing the VB concept with Delphi (Object Pascal)
and RAD C++ for a very long time and the stuff done for Delphi or the RAD
C++ is interchangeable. I think Borland outdid MSFT's VB concept in
Delphi/Borland Builder/Borland Developer Studio. And... It all compiles to
native code. Oh actually it is all called Code Gear now... Borland decided
to spin off Developer Tools as its own group so there would be solid focus
on the developer tools themselves and no futzing around with it by their
other product lines... Fun idea.

It wasn't always the case, Borland had the OWL framework which sucked just
like MFC sucked. VCL is very nice. Built into the product I have components
for all of the standard network protocols, seemingly a zillion form items,
services, Database access including MSFT and third party DBs such as MySQL,
Oracle, etc.

I wrote a tool called Global Group Craching Manager as a joke on Dean on the
flight out to Vegas last year. It isn't that I don't do GUI because I can't
or that Borland can't spank Visual Studio hands down on it, it is because I
dislike GUI. :)

If you did a search for free and purchasable VCL components I would be
shocked if the number of them doesn't beat the .NET stuff by at least
double.

There is a reason why I am willing to pay >$1000 for the latest Borland C++
Professional series of compilers versus using the free to me Visual Studio.

joe
--
O'Reilly Active Directory Third Edition -
http://www.joeware.net/win/ad3e.htm


-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Brian Desmond
Sent: Wednesday, May 09, 2007 12:03 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Issues with System.DirectoryServices

You should at least look at it for Winforms stuff - the third party controls
(many of which you're entitled to through other channels) do a ton of stuff
and I don't imagine you could easily replicate or procure much of that
functionality for Borland's forms stuff.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-
> owner@mail.activedir.org] On Behalf Of joe
> Sent: Tuesday, May 08, 2007 11:48 PM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> Shhhhhh.
>
> Think of it as bar talk, at about 1AM. :)
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Darren Mar-
> Elia
> Sent: Tuesday, May 08, 2007 11:24 PM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> Joe-
> You're kinda talking apples and oranges. Just because you have a
> garbage
> collection system does not mean that object references that get
> orphaned or
> are otherwise held too long will always get garbage collected. Its just
> good
> code practice to finalize objects to make sure they get cleaned up. Its
> still easier, frankly, than pointer gymnastics...
>
> Darren
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of joe
> Sent: Tuesday, May 08, 2007 7:44 PM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> WHAT!!! That's outrageous, if I am using .NET it is supposed to be
> handling
> all of my garbage collection for me automatically!!!! I use because I
> don't
> want to track all of that stuff or I don't know how to track that stuff
> or
> some other reason!!!
>
> ;o)
>
> That tire gets flatter little by little.
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> Sent: Tuesday, May 08, 2007 8:25 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> Oh, I should also mention that anytime you access a method or property
> that returns a DirectoryEntry, you are also responsible for disposing
> of it. This can be a gotcha. So this code might leak:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
> //do something with Parent
> entry.Dispose(); //what about parent?
>
> Here is an even more insidious one:
>
> Console.WriteLine(entry.Parent.Path);
>
> Most people will forget to call entry.Parent.Dispose() since it is not
> a local variable.
>
> How to fix:
>
> DirectoryEntry entry = new DirectoryEntry(...);
> DirectoryEntry parent = entry.Parent;
>
> using (entry)
> using (parent)
> {
> // do stuff
> }// both are disposed here for you...
>
> Remember, this applies to *any* method or Property that returns a
> DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> and also DirectoryEntry.Children.Add for instance.
>
>
>
> On 5/8/07, Isenhour, Joseph wrote:
> >
> >
> >
> > I have a web app that I'm developing that seems to having issues with
> > System.DirectoryServices. The app uses S.DS pretty heavily and it
> plugs
> > along just fine for a while but then all of the sudden anything that
> calls
> > S.DS simply fails. I then have to restart IIS in order for it to
> begin
> > working again. I'm assuming that I'm using up some resource within
> S.DS
> and
> > never freeing it; however, I don't know of any good way to figure out
> which
> > resource I'm exausting.
> >
> > I've gone through and looked at all of my DirectoryEntry and
> > DirectorySearcher objects and have ensured that I'm calling .Close
> and
> > .Dispose when I'm done with them. It's possible that I'm leaving the
> > objects open but I don't really know how to tell. Does anyone know
> of a
> > good tool or method that I can use to troubleshoot S.DS?
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
bdesmondUser is Offline

Posts:977

05/09/2007 12:32 PM  
I'm not too familiar with the Delphi stuff, I didn't know the components for it also worked with their C++ tools.

Thanks,
Brian Desmond
brian@briandesmond.com

c - 312.731.3132
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-
> owner@mail.activedir.org] On Behalf Of joe
> Sent: Wednesday, May 09, 2007 12:24 AM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> I think you would be shocked at how much is available out there for
> Borland... Borland has been doing the VB concept with Delphi (Object
> Pascal)
> and RAD C++ for a very long time and the stuff done for Delphi or the
> RAD
> C++ is interchangeable. I think Borland outdid MSFT's VB concept in
> Delphi/Borland Builder/Borland Developer Studio. And... It all compiles
> to
> native code. Oh actually it is all called Code Gear now... Borland
> decided
> to spin off Developer Tools as its own group so there would be solid
> focus
> on the developer tools themselves and no futzing around with it by
> their
> other product lines... Fun idea.
>
> It wasn't always the case, Borland had the OWL framework which sucked
> just
> like MFC sucked. VCL is very nice. Built into the product I have
> components
> for all of the standard network protocols, seemingly a zillion form
> items,
> services, Database access including MSFT and third party DBs such as
> MySQL,
> Oracle, etc.
>
> I wrote a tool called Global Group Craching Manager as a joke on Dean
> on the
> flight out to Vegas last year. It isn't that I don't do GUI because I
> can't
> or that Borland can't spank Visual Studio hands down on it, it is
> because I
> dislike GUI. :)
>
> If you did a search for free and purchasable VCL components I would be
> shocked if the number of them doesn't beat the .NET stuff by at least
> double.
>
> There is a reason why I am willing to pay >$1000 for the latest Borland
> C++
> Professional series of compilers versus using the free to me Visual
> Studio.
>
> joe
>
>
> --
> O'Reilly Active Directory Third Edition -
> http://www.joeware.net/win/ad3e.htm
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Brian Desmond
> Sent: Wednesday, May 09, 2007 12:03 AM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> You should at least look at it for Winforms stuff - the third party
> controls
> (many of which you're entitled to through other channels) do a ton of
> stuff
> and I don't imagine you could easily replicate or procure much of that
> functionality for Borland's forms stuff.
>
> Thanks,
> Brian Desmond
> brian@briandesmond.com
>
> c - 312.731.3132
>
>
> > -----Original Message-----
> > From: ActiveDir-owner@mail.activedir.org [mailto:ActiveDir-
> > owner@mail.activedir.org] On Behalf Of joe
> > Sent: Tuesday, May 08, 2007 11:48 PM
> > To: ActiveDir@mail.activedir.org
> > Subject: RE: [ActiveDir] Issues with System.DirectoryServices
> >
> > Shhhhhh.
> >
> > Think of it as bar talk, at about 1AM. :)
> >
> >
> > --
> > O'Reilly Active Directory Third Edition -
> > http://www.joeware.net/win/ad3e.htm
> >
> >
> > -----Original Message-----
> > From: ActiveDir-owner@mail.activedir.org
> > [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Darren Mar-
> > Elia
> > Sent: Tuesday, May 08, 2007 11:24 PM
> > To: ActiveDir@mail.activedir.org
> > Subject: RE: [ActiveDir] Issues with System.DirectoryServices
> >
> > Joe-
> > You're kinda talking apples and oranges. Just because you have a
> > garbage
> > collection system does not mean that object references that get
> > orphaned or
> > are otherwise held too long will always get garbage collected. Its
> just
> > good
> > code practice to finalize objects to make sure they get cleaned up.
> Its
> > still easier, frankly, than pointer gymnastics...
> >
> > Darren
> >
> >
> > -----Original Message-----
> > From: ActiveDir-owner@mail.activedir.org
> > [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of joe
> > Sent: Tuesday, May 08, 2007 7:44 PM
> > To: ActiveDir@mail.activedir.org
> > Subject: RE: [ActiveDir] Issues with System.DirectoryServices
> >
> > WHAT!!! That's outrageous, if I am using .NET it is supposed to be
> > handling
> > all of my garbage collection for me automatically!!!! I use because I
> > don't
> > want to track all of that stuff or I don't know how to track that
> stuff
> > or
> > some other reason!!!
> >
> > ;o)
> >
> > That tire gets flatter little by little.
> >
> >
> > --
> > O'Reilly Active Directory Third Edition -
> > http://www.joeware.net/win/ad3e.htm
> >
> >
> > -----Original Message-----
> > From: ActiveDir-owner@mail.activedir.org
> > [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
> > Sent: Tuesday, May 08, 2007 8:25 PM
> > To: ActiveDir@mail.activedir.org
> > Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> >
> > Oh, I should also mention that anytime you access a method or
> property
> > that returns a DirectoryEntry, you are also responsible for disposing
> > of it. This can be a gotcha. So this code might leak:
> >
> > DirectoryEntry entry = new DirectoryEntry(...);
> > DirectoryEntry parent = entry.Parent;
> > //do something with Parent
> > entry.Dispose(); //what about parent?
> >
> > Here is an even more insidious one:
> >
> > Console.WriteLine(entry.Parent.Path);
> >
> > Most people will forget to call entry.Parent.Dispose() since it is
> not
> > a local variable.
> >
> > How to fix:
> >
> > DirectoryEntry entry = new DirectoryEntry(...);
> > DirectoryEntry parent = entry.Parent;
> >
> > using (entry)
> > using (parent)
> > {
> > // do stuff
> > }// both are disposed here for you...
> >
> > Remember, this applies to *any* method or Property that returns a
> > DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
> > and also DirectoryEntry.Children.Add for instance.
> >
> >
> >
> > On 5/8/07, Isenhour, Joseph wrote:
> > >
> > >
> > >
> > > I have a web app that I'm developing that seems to having issues
> with
> > > System.DirectoryServices. The app uses S.DS pretty heavily and it
> > plugs
> > > along just fine for a while but then all of the sudden anything
> that
> > calls
> > > S.DS simply fails. I then have to restart IIS in order for it to
> > begin
> > > working again. I'm assuming that I'm using up some resource within
> > S.DS
> > and
> > > never freeing it; however, I don't know of any good way to figure
> out
> > which
> > > resource I'm exausting.
> > >
> > > I've gone through and looked at all of my DirectoryEntry and
> > > DirectorySearcher objects and have ensured that I'm calling .Close
> > and
> > > .Dispose when I'm done with them. It's possible that I'm leaving
> the
> > > objects open but I don't really know how to tell. Does anyone know
> > of a
> > > good tool or method that I can use to troubleshoot S.DS?
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
> >
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
> >
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
> >
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
josephisenhourUser is Offline

Posts:0

05/10/2007 1:14 AM  
Thanks Joe,

So maybe I do need to persist the connections somehow. I do use a
single account (well one per forest) to do all of my LDAP operations.

So how about something like this:

protected void Application_Start(Object sender, EventArgs e)
{

string[] domainNames = {"domain1.net", "domain2.net" };
System.Collections.Hashtable domains = new Hashtable();

foreach( string domainName in domainNames )
{
System.DirectoryServices.DirectoryEntry d = new
System.DirectoryServices.DirectoryEntry();

d.Path =
string.Format("LDAP://{0}/DC={1}", domainName, domainName.Replace(".",
",DC="));
d.Username = SAMTools.GetSvcID( domainName );
d.Password = SAMTools.GetSvcPass( domainName
);
d.AuthenticationType =
System.DirectoryServices.AuthenticationTypes.Secure;
d.RefreshCache();

domains.Add( domainName, d );
}
}

What if I add this to the Global.asax Application_Start? Will that
possibly cache my connections and allow all new sessions to re-use them?

-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
Sent: Wednesday, May 09, 2007 8:25 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

This is important stuff to know. If there are different user identities
accessing the directory, ADSI will open up a new connection for each
one.
That is by design and is just the way that ADSI works. That makes it
difficult to get lots of scalability with apps that use an impersonation
model.

However, if he's seeing 80 connections for just one user when the
expectation is that there are only 6 forests to connect to, that would
seem to indicate that connections aren't getting reused and connection
caching isn't working as expected. That could cause problems.

Ryan suggested earlier to make sure the Dispose is being called
religiously so that the underlying ADSI objects are being cleaned up
right when you are done with them and not waiting around for garbage
collection. This is a good idea, although not as important as it was in
.NET 1.x where there were bugs that caused ADSI COM objects to not get
cleaned up if you failed to call Dispose. At least now, the GC will
eventually get around to it, just maybe not as quickly as you'd like.

However, the downside of calling Dispose or Close is that if no other
ADSI objects are also using that LDAP connection, it will close it. In
general that is a good thing because you want your connections closed
when you are done with them. The problem comes in when moments later, a
new web request comes in the site code causes new connections to be
opened instead of reusing one that is already open. If the opening and
closing happens over and over again, you'll eventually run out of TCP
wildcard ports and will get errors. This is because once the TCP port
closes, it will sit in "time wait" for 60 seconds and won't be available
for new connections until it releases.

It isn't totally clear to me that this is the issue, but it sounds like
it might be. It is pretty difficult to diagnose in my experience.

One thing you can do programmatically to try to make sure your LDAP
connections stay open so that ADSI will reuse them. If you use a single
set of credentials for all of your access, then you can sometimes
accomplish this by opening up connections in something like the
application_start even and sticking the DirectoryEntry objects into
static variables or something so they won't be collected.

I hope that helps a bit more.

Joe K.

----- Original Message -----
From: "Ryan Dunn"
To:
Sent: Wednesday, May 09, 2007 1:15 PM
Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> We need more information here. How are you creating the connections?
> For example, show us how you are constructing your DirectoryEntry
> objects. What is the security context of the application? the
> user's? a trusted subsystem? impersonated?
>
> On 5/9/07, Isenhour, Joseph wrote:
>> I'm actually seeing around 80 LDAP connections. The app is talking
to 6
>> different forests so I'd expect to see around 6 to 10 connections.
>>
>> The app is a C# web form so many users will be hitting it at any
given
>> time. Right now I'm the only one hitting it and it's taking 80
>> connections. Is there anyway to ensure that the connections either
get
>> re-used or at least get closed imediatley after the objects are
>> disposed?
>>
>> -----Original Message-----
>> From: ActiveDir-owner@mail.activedir.org
>> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
>> Sent: Tuesday, May 08, 2007 7:45 PM
>> To: ActiveDir@mail.activedir.org
>> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>>
>> Another thing that can happen here is the dreaded ADSI connection
>> caching issue where you run out of wild card ports. If netstat shows
a
>> lot of ports sitting in "time wait" status, that could be the issue.
>> This is often the problem when you see somewhat random ADSI failures
in
>> code that was working fine before but where many ADSI calls were
being
>> made.
>>
>> Joe K.
>>
>> ----- Original Message -----
>> From: "Ryan Dunn"
>> To:
>> Sent: Tuesday, May 08, 2007 7:25 PM
>> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>>
>>
>> > Oh, I should also mention that anytime you access a method or
property
>> > that returns a DirectoryEntry, you are also responsible for
disposing
>> > of it. This can be a gotcha. So this code might leak:
>> >
>> > DirectoryEntry entry = new DirectoryEntry(...);
>> > DirectoryEntry parent = entry.Parent;
>> > //do something with Parent
>> > entry.Dispose(); //what about parent?
>> >
>> > Here is an even more insidious one:
>> >
>> > Console.WriteLine(entry.Parent.Path);
>> >
>> > Most people will forget to call entry.Parent.Dispose() since it is
not
>> > a local variable.
>> >
>> > How to fix:
>> >
>> > DirectoryEntry entry = new DirectoryEntry(...);
>> > DirectoryEntry parent = entry.Parent;
>> >
>> > using (entry)
>> > using (parent)
>> > {
>> > // do stuff
>> > }// both are disposed here for you...
>> >
>> > Remember, this applies to *any* method or Property that returns a
>> > DirectoryEntry. So be wary of
DirectorySearcher.GetDirectoryEntry()
>> > and also DirectoryEntry.Children.Add for instance.
>> >
>> >
>> >
>> > On 5/8/07, Isenhour, Joseph wrote:
>> >>
>> >>
>> >>
>> >> I have a web app that I'm developing that seems to having issues
with
>> >> System.DirectoryServices. The app uses S.DS pretty heavily and it
>> plugs
>> >> along just fine for a while but then all of the sudden anything
that
>> >> calls
>> >> S.DS simply fails. I then have to restart IIS in order for it to
>> begin
>> >> working again. I'm assuming that I'm using up some resource
within
>> S.DS
>> >> and
>> >> never freeing it; however, I don't know of any good way to figure
out
>>
>> >> which
>> >> resource I'm exausting.
>> >>
>> >> I've gone through and looked at all of my DirectoryEntry and
>> >> DirectorySearcher objects and have ensured that I'm calling .Close
>> and
>> >> .Dispose when I'm done with them. It's possible that I'm leaving
the
>> >> objects open but I don't really know how to tell. Does anyone
know
>> of a
>> >> good tool or method that I can use to troubleshoot S.DS?
>> > List info : http://www.activedir.org/List.aspx
>> > List FAQ : http://www.activedir.org/ListFAQ.aspx
>> > List archive: http://www.activedir.org/ma/default.aspx
>>
>> List info : http://www.activedir.org/List.aspx
>> List FAQ : http://www.activedir.org/ListFAQ.aspx
>> List archive: http://www.activedir.org/ma/default.aspx
>> List info : http://www.activedir.org/List.aspx
>> List FAQ : http://www.activedir.org/ListFAQ.aspx
>> List archive: http://www.activedir.org/ma/default.aspx
>>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
josephisenhourUser is Offline

Posts:0

05/10/2007 1:16 AM  
Thanks Ryan,

I actually found one place where I was doing exactly this. I fixed it
but it didn't solve my issue :( But at least I know it's running a
little more efficiently :)

-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Ryan Dunn
Sent: Tuesday, May 08, 2007 5:25 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

Oh, I should also mention that anytime you access a method or property
that returns a DirectoryEntry, you are also responsible for disposing of
it. This can be a gotcha. So this code might leak:

DirectoryEntry entry = new DirectoryEntry(...); DirectoryEntry parent =
entry.Parent; //do something with Parent entry.Dispose(); //what about
parent?

Here is an even more insidious one:

Console.WriteLine(entry.Parent.Path);

Most people will forget to call entry.Parent.Dispose() since it is not a
local variable.

How to fix:

DirectoryEntry entry = new DirectoryEntry(...); DirectoryEntry parent =
entry.Parent;

using (entry)
using (parent)
{
// do stuff
}// both are disposed here for you...

Remember, this applies to *any* method or Property that returns a
DirectoryEntry. So be wary of DirectorySearcher.GetDirectoryEntry()
and also DirectoryEntry.Children.Add for instance.

On 5/8/07, Isenhour, Joseph wrote:
>
>
>
> I have a web app that I'm developing that seems to having issues with
> System.DirectoryServices. The app uses S.DS pretty heavily and it
> plugs along just fine for a while but then all of the sudden anything
> that calls S.DS simply fails. I then have to restart IIS in order for

> it to begin working again. I'm assuming that I'm using up some
> resource within S.DS and never freeing it; however, I don't know of
> any good way to figure out which resource I'm exausting.
>
> I've gone through and looked at all of my DirectoryEntry and
> DirectorySearcher objects and have ensured that I'm calling .Close and

> .Dispose when I'm done with them. It's possible that I'm leaving the
> objects open but I don't really know how to tell. Does anyone know of

> a good tool or method that I can use to troubleshoot S.DS?
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
josephisenhourUser is Offline

Posts:0

05/10/2007 5:52 AM  
Think I found it. It looks like it doesn't have anything to do with SDS
although the end result is SDS not working.

I wrote a .NET wrapper for the win32 DsAddressToSiteNames function.

private static extern int DsAddressToSiteNames

It looks like the error occurs after this code is executed several
times. I'm trying to be a good .NET developer and free up my unmanaged
resources in a finally statement; however, it appears that I'm missing
something.

Does anyone know of a Microsoft supported .NET method that will give me
the same functionality as DsAddressToSiteNames?
-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Isenhour,
Joseph
Sent: Thursday, May 10, 2007 10:15 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Issues with System.DirectoryServices

Thanks Joe,

So maybe I do need to persist the connections somehow. I do use a
single account (well one per forest) to do all of my LDAP operations.

So how about something like this:

protected void Application_Start(Object sender, EventArgs e) {

string[] domainNames = {"domain1.net", "domain2.net" };
System.Collections.Hashtable domains = new Hashtable();

foreach( string domainName in domainNames )
{
System.DirectoryServices.DirectoryEntry d = new
System.DirectoryServices.DirectoryEntry();

d.Path =
string.Format("LDAP://{0}/DC={1}", domainName, domainName.Replace(".",
",DC="));
d.Username = SAMTools.GetSvcID( domainName );
d.Password = SAMTools.GetSvcPass( domainName
);
d.AuthenticationType =
System.DirectoryServices.AuthenticationTypes.Secure;
d.RefreshCache();

domains.Add( domainName, d );
}
}

What if I add this to the Global.asax Application_Start? Will that
possibly cache my connections and allow all new sessions to re-use them?

-----Original Message-----
From: ActiveDir-owner@mail.activedir.org
[mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
Sent: Wednesday, May 09, 2007 8:25 PM
To: ActiveDir@mail.activedir.org
Subject: Re: [ActiveDir] Issues with System.DirectoryServices

This is important stuff to know. If there are different user identities
accessing the directory, ADSI will open up a new connection for each
one.
That is by design and is just the way that ADSI works. That makes it
difficult to get lots of scalability with apps that use an impersonation
model.

However, if he's seeing 80 connections for just one user when the
expectation is that there are only 6 forests to connect to, that would
seem to indicate that connections aren't getting reused and connection
caching isn't working as expected. That could cause problems.

Ryan suggested earlier to make sure the Dispose is being called
religiously so that the underlying ADSI objects are being cleaned up
right when you are done with them and not waiting around for garbage
collection. This is a good idea, although not as important as it was in
.NET 1.x where there were bugs that caused ADSI COM objects to not get
cleaned up if you failed to call Dispose. At least now, the GC will
eventually get around to it, just maybe not as quickly as you'd like.

However, the downside of calling Dispose or Close is that if no other
ADSI objects are also using that LDAP connection, it will close it. In
general that is a good thing because you want your connections closed
when you are done with them. The problem comes in when moments later, a
new web request comes in the site code causes new connections to be
opened instead of reusing one that is already open. If the opening and
closing happens over and over again, you'll eventually run out of TCP
wildcard ports and will get errors. This is because once the TCP port
closes, it will sit in "time wait" for 60 seconds and won't be available
for new connections until it releases.

It isn't totally clear to me that this is the issue, but it sounds like
it might be. It is pretty difficult to diagnose in my experience.

One thing you can do programmatically to try to make sure your LDAP
connections stay open so that ADSI will reuse them. If you use a single
set of credentials for all of your access, then you can sometimes
accomplish this by opening up connections in something like the
application_start even and sticking the DirectoryEntry objects into
static variables or something so they won't be collected.

I hope that helps a bit more.

Joe K.

----- Original Message -----
From: "Ryan Dunn"
To:
Sent: Wednesday, May 09, 2007 1:15 PM
Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> We need more information here. How are you creating the connections?
> For example, show us how you are constructing your DirectoryEntry
> objects. What is the security context of the application? the
> user's? a trusted subsystem? impersonated?
>
> On 5/9/07, Isenhour, Joseph wrote:
>> I'm actually seeing around 80 LDAP connections. The app is talking
to 6
>> different forests so I'd expect to see around 6 to 10 connections.
>>
>> The app is a C# web form so many users will be hitting it at any
given
>> time. Right now I'm the only one hitting it and it's taking 80
>> connections. Is there anyway to ensure that the connections either
get
>> re-used or at least get closed imediatley after the objects are
>> disposed?
>>
>> -----Original Message-----
>> From: ActiveDir-owner@mail.activedir.org
>> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
>> Sent: Tuesday, May 08, 2007 7:45 PM
>> To: ActiveDir@mail.activedir.org
>> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>>
>> Another thing that can happen here is the dreaded ADSI connection
>> caching issue where you run out of wild card ports. If netstat shows
a
>> lot of ports sitting in "time wait" status, that could be the issue.
>> This is often the problem when you see somewhat random ADSI failures
in
>> code that was working fine before but where many ADSI calls were
being
>> made.
>>
>> Joe K.
>>
>> ----- Original Message -----
>> From: "Ryan Dunn"
>> To:
>> Sent: Tuesday, May 08, 2007 7:25 PM
>> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>>
>>
>> > Oh, I should also mention that anytime you access a method or
property
>> > that returns a DirectoryEntry, you are also responsible for
disposing
>> > of it. This can be a gotcha. So this code might leak:
>> >
>> > DirectoryEntry entry = new DirectoryEntry(...); DirectoryEntry
>> > parent = entry.Parent; //do something with Parent entry.Dispose();
>> > //what about parent?
>> >
>> > Here is an even more insidious one:
>> >
>> > Console.WriteLine(entry.Parent.Path);
>> >
>> > Most people will forget to call entry.Parent.Dispose() since it is
not
>> > a local variable.
>> >
>> > How to fix:
>> >
>> > DirectoryEntry entry = new DirectoryEntry(...); DirectoryEntry
>> > parent = entry.Parent;
>> >
>> > using (entry)
>> > using (parent)
>> > {
>> > // do stuff
>> > }// both are disposed here for you...
>> >
>> > Remember, this applies to *any* method or Property that returns a
>> > DirectoryEntry. So be wary of
DirectorySearcher.GetDirectoryEntry()
>> > and also DirectoryEntry.Children.Add for instance.
>> >
>> >
>> >
>> > On 5/8/07, Isenhour, Joseph wrote:
>> >>
>> >>
>> >>
>> >> I have a web app that I'm developing that seems to having issues
with
>> >> System.DirectoryServices. The app uses S.DS pretty heavily and it
>> plugs
>> >> along just fine for a while but then all of the sudden anything
that
>> >> calls
>> >> S.DS simply fails. I then have to restart IIS in order for it to
>> begin
>> >> working again. I'm assuming that I'm using up some resource
within
>> S.DS
>> >> and
>> >> never freeing it; however, I don't know of any good way to figure
out
>>
>> >> which
>> >> resource I'm exausting.
>> >>
>> >> I've gone through and looked at all of my DirectoryEntry and
>> >> DirectorySearcher objects and have ensured that I'm calling .Close
>> and
>> >> .Dispose when I'm done with them. It's possible that I'm leaving
the
>> >> objects open but I don't really know how to tell. Does anyone
know
>> of a
>> >> good tool or method that I can use to troubleshoot S.DS?
>> > List info : http://www.activedir.org/List.aspx
>> > List FAQ : http://www.activedir.org/ListFAQ.aspx
>> > List archive: http://www.activedir.org/ma/default.aspx
>>
>> List info : http://www.activedir.org/List.aspx
>> List FAQ : http://www.activedir.org/ListFAQ.aspx
>> List archive: http://www.activedir.org/ma/default.aspx
>> List info : http://www.activedir.org/List.aspx
>> List FAQ : http://www.activedir.org/ListFAQ.aspx
>> List archive: http://www.activedir.org/ma/default.aspx
>>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx

List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
dunnryUser is Offline

Posts:0

05/10/2007 6:20 AM  
That function doesn't look too risky... are you remembering to call
NetApiBufferFree?

On 5/10/07, Isenhour, Joseph wrote:
> Think I found it. It looks like it doesn't have anything to do with SDS
> although the end result is SDS not working.
>
> I wrote a .NET wrapper for the win32 DsAddressToSiteNames function.
>
> private static extern int DsAddressToSiteNames
>
> It looks like the error occurs after this code is executed several
> times. I'm trying to be a good .NET developer and free up my unmanaged
> resources in a finally statement; however, it appears that I'm missing
> something.
>
> Does anyone know of a Microsoft supported .NET method that will give me
> the same functionality as DsAddressToSiteNames?
>
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Isenhour,
> Joseph
> Sent: Thursday, May 10, 2007 10:15 AM
> To: ActiveDir@mail.activedir.org
> Subject: RE: [ActiveDir] Issues with System.DirectoryServices
>
> Thanks Joe,
>
> So maybe I do need to persist the connections somehow. I do use a
> single account (well one per forest) to do all of my LDAP operations.
>
> So how about something like this:
>
> protected void Application_Start(Object sender, EventArgs e) {
>
> string[] domainNames = {"domain1.net", "domain2.net" };
> System.Collections.Hashtable domains = new Hashtable();
>
> foreach( string domainName in domainNames )
> {
> System.DirectoryServices.DirectoryEntry d = new
> System.DirectoryServices.DirectoryEntry();
>
> d.Path =
> string.Format("LDAP://{0}/DC={1}", domainName, domainName.Replace(".",
> ",DC="));
> d.Username = SAMTools.GetSvcID( domainName );
> d.Password = SAMTools.GetSvcPass( domainName
> );
> d.AuthenticationType =
> System.DirectoryServices.AuthenticationTypes.Secure;
> d.RefreshCache();
>
> domains.Add( domainName, d );
> }
> }
>
> What if I add this to the Global.asax Application_Start? Will that
> possibly cache my connections and allow all new sessions to re-use them?
>
> -----Original Message-----
> From: ActiveDir-owner@mail.activedir.org
> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
> Sent: Wednesday, May 09, 2007 8:25 PM
> To: ActiveDir@mail.activedir.org
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
> This is important stuff to know. If there are different user identities
> accessing the directory, ADSI will open up a new connection for each
> one.
> That is by design and is just the way that ADSI works. That makes it
> difficult to get lots of scalability with apps that use an impersonation
> model.
>
> However, if he's seeing 80 connections for just one user when the
> expectation is that there are only 6 forests to connect to, that would
> seem to indicate that connections aren't getting reused and connection
> caching isn't working as expected. That could cause problems.
>
> Ryan suggested earlier to make sure the Dispose is being called
> religiously so that the underlying ADSI objects are being cleaned up
> right when you are done with them and not waiting around for garbage
> collection. This is a good idea, although not as important as it was in
> .NET 1.x where there were bugs that caused ADSI COM objects to not get
> cleaned up if you failed to call Dispose. At least now, the GC will
> eventually get around to it, just maybe not as quickly as you'd like.
>
> However, the downside of calling Dispose or Close is that if no other
> ADSI objects are also using that LDAP connection, it will close it. In
> general that is a good thing because you want your connections closed
> when you are done with them. The problem comes in when moments later, a
> new web request comes in the site code causes new connections to be
> opened instead of reusing one that is already open. If the opening and
> closing happens over and over again, you'll eventually run out of TCP
> wildcard ports and will get errors. This is because once the TCP port
> closes, it will sit in "time wait" for 60 seconds and won't be available
> for new connections until it releases.
>
> It isn't totally clear to me that this is the issue, but it sounds like
> it might be. It is pretty difficult to diagnose in my experience.
>
> One thing you can do programmatically to try to make sure your LDAP
> connections stay open so that ADSI will reuse them. If you use a single
> set of credentials for all of your access, then you can sometimes
> accomplish this by opening up connections in something like the
> application_start even and sticking the DirectoryEntry objects into
> static variables or something so they won't be collected.
>
> I hope that helps a bit more.
>
> Joe K.
>
> ----- Original Message -----
> From: "Ryan Dunn"
> To:
> Sent: Wednesday, May 09, 2007 1:15 PM
> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
>
>
> > We need more information here. How are you creating the connections?
> > For example, show us how you are constructing your DirectoryEntry
> > objects. What is the security context of the application? the
> > user's? a trusted subsystem? impersonated?
> >
> > On 5/9/07, Isenhour, Joseph wrote:
> >> I'm actually seeing around 80 LDAP connections. The app is talking
> to 6
> >> different forests so I'd expect to see around 6 to 10 connections.
> >>
> >> The app is a C# web form so many users will be hitting it at any
> given
> >> time. Right now I'm the only one hitting it and it's taking 80
> >> connections. Is there anyway to ensure that the connections either
> get
> >> re-used or at least get closed imediatley after the objects are
> >> disposed?
> >>
> >> -----Original Message-----
> >> From: ActiveDir-owner@mail.activedir.org
> >> [mailto:ActiveDir-owner@mail.activedir.org] On Behalf Of Joe Kaplan
> >> Sent: Tuesday, May 08, 2007 7:45 PM
> >> To: ActiveDir@mail.activedir.org
> >> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> >>
> >> Another thing that can happen here is the dreaded ADSI connection
> >> caching issue where you run out of wild card ports. If netstat shows
> a
> >> lot of ports sitting in "time wait" status, that could be the issue.
> >> This is often the problem when you see somewhat random ADSI failures
> in
> >> code that was working fine before but where many ADSI calls were
> being
> >> made.
> >>
> >> Joe K.
> >>
> >> ----- Original Message -----
> >> From: "Ryan Dunn"
> >> To:
> >> Sent: Tuesday, May 08, 2007 7:25 PM
> >> Subject: Re: [ActiveDir] Issues with System.DirectoryServices
> >>
> >>
> >> > Oh, I should also mention that anytime you access a method or
> property
> >> > that returns a DirectoryEntry, you are also responsible for
> disposing
> >> > of it. This can be a gotcha. So this code might leak:
> >> >
> >> > DirectoryEntry entry = new DirectoryEntry(...); DirectoryEntry
> >> > parent = entry.Parent; //do something with Parent entry.Dispose();
> >> > //what about parent?
> >> >
> >> > Here is an even more insidious one:
> >> >
> >> > Console.WriteLine(entry.Parent.Path);
> >> >
> >> > Most people will forget to call entry.Parent.Dispose() since it is
> not
> >> > a local variable.
> >> >
> >> > How to fix:
> >> >
> >> > DirectoryEntry entry = new DirectoryEntry(...); DirectoryEntry
> >> > parent = entry.Parent;
> >> >
> >> > using (entry)
> >> > using (parent)
> >> > {
> >> > // do stuff
> >> > }// both are disposed here for you...
> >> >
> >> > Remember, this applies to *any* method or Property that returns a
> >> > DirectoryEntry. So be wary of
> DirectorySearcher.GetDirectoryEntry()
> >> > and also DirectoryEntry.Children.Add for instance.
> >> >
> >> >
> >> >
> >> > On 5/8/07, Isenhour, Joseph wrote:
> >> >>
> >> >>
> >> >>
> >> >> I have a web app that I'm developing that seems to having issues
> with
> >> >> System.DirectoryServices. The app uses S.DS pretty heavily and it
> >> plugs
> >> >> along just fine for a while but then all of the sudden anything
> that
> >> >> calls
> >> >> S.DS simply fails. I then have to restart IIS in order for it to
> >> begin
> >> >> working again. I'm assuming that I'm using up some resource
> within
> >> S.DS
> >> >> and
> >> >> never freeing it; however, I don't know of any good way to figure
> out
> >>
> >> >> which
> >> >> resource I'm exausting.
> >> >>
> >> >> I've gone through and looked at all of my DirectoryEntry and
> >> >> DirectorySearcher objects and have ensured that I'm calling .Close
> >> and
> >> >> .Dispose when I'm done with them. It's possible that I'm leaving
> the
> >> >> objects open but I don't really know how to tell. Does anyone
> know
> >> of a
> >> >> good tool or method that I can use to troubleshoot S.DS?
> >> > List info : http://www.activedir.org/List.aspx
> >> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> >> > List archive: http://www.activedir.org/ma/default.aspx
> >>
> >> List info : http://www.activedir.org/List.aspx
> >> List FAQ : http://www.activedir.org/ListFAQ.aspx
> >> List archive: http://www.activedir.org/ma/default.aspx
> >> List info : http://www.activedir.org/List.aspx
> >> List FAQ : http://www.activedir.org/ListFAQ.aspx
> >> List archive: http://www.activedir.org/ma/default.aspx
> >>
> > List info : http://www.activedir.org/List.aspx
> > List FAQ : http://www.activedir.org/ListFAQ.aspx
> > List archive: http://www.activedir.org/ma/default.aspx
>
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
> List info : http://www.activedir.org/List.aspx
> List FAQ : http://www.activedir.org/ListFAQ.aspx
> List archive: http://www.activedir.org/ma/default.aspx
>
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.activedir.org/ma/default.aspx
You are not authorized to post a reply.
Page 1 of 212 > >>

Forums >ActiveDir Mail List Archive >List Archives > [ActiveDir] Issues with System.DirectoryServices



ActiveForums 3.7
Friends

Friends

VisualClickButoton
Members

Members

MembershipMembership:
Latest New UserLatest:MrPTSai
New TodayNew Today:0
New YesterdayNew Yesterday:0
User CountOverall:5234

People OnlinePeople Online:
VisitorsVisitors:33
MembersMembers:0
TotalTotal:33

Online NowOnline Now:

Ads

Copyright 2009 ActiveDir.org
Terms Of Use