473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Getting error SOMETIMES with DirectoryEntry.RefreshCache connect t

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.
--
Thanks.
Oct 19 '07 #1
0 1709

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

Similar topics

4
by: David Moore | last post by:
Hello I am using the System.DirectoryServices namespace classes to access Active Directory. We connect using the LDAP://DOMAIN method. The code works on local dev boxes, and in staging, but...
7
by: cameron | last post by:
I am in a situation in which I am recieving a DirectoryEntry that may or may not be already be disposed. I need a very fast, (from a code point of view not necissarily a coding point of view), way...
5
by: Dave | last post by:
Hi All C# ADSI samples that I run cause unspecified errors. If I translate them into VB.NET they run fine. Here's an example: public string getEmail(string LDAPPath, string username) {...
1
by: John Daly | last post by:
The following code works fine on my development pc: Public Shared Function GetFullName(ByVal userID As String) As String Dim sQry As String = "WinNT://" & userID.Replace("\", "/") & ",user" Dim...
0
by: Mischa | last post by:
I am trying to create a proof of concept to show how to connect to an LDAP server and how to search for values but I do not get anywhere. Here is what I have so far: Dim objEntry As...
4
by: shashank kadge | last post by:
hi all, i am trying to get local admin users and groups on a windows server. here is the C# code that i am using...
6
by: =?Utf-8?B?dGhsMTAwMA==?= | last post by:
Hi NG, i need to list the logonHours for a specific user. I'm trying to convert code from vbscript (is working) to vb.net, but the vb.net code does not work. Here are the code listings: 1:...
5
by: Michael Howes | last post by:
I'm writing a utility to manage a machines *local* accounts in c# I am getting all the users in a specific Group just fine but when I want to get some of the information on each user from their...
0
by: TG | last post by:
Hi! Once again I have hit a brick wall here. I have a combobox in which the user types the server name and then clicks on button 'CONNECT' to populate the next combobox which contains all the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.