Getting error SOMETIMES with DirectoryEntry.RefreshCache connect t

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm using VS 2005, .net 2 and C# for a windows application. Let's say I'm
running from loggin into a domain controller DC1. I have a treeview and
nodes representing a DirectoryEntry object. When a node is selected there is
a line of code that selectedNode.RefreshCache(); is used. The strange thing
is when the user select to connecty to a different domain controller, let's
say DC2. I would get an error msg saying "No such object on the server" when
it tried to run selectedNode.RefreshCache();. However, when I run the
application from loggin into DC2, when I connect to DC1 the program runs
still fine. I switch from different DCs in DC2 and there isn't any error
problem. I was wondering how can I fix this problem and why is it behaving
as such? Thank you.
 
Back
Top