473,404 Members | 2,114 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,404 software developers and data experts.

Get exchange 5.5 user properties in C#

Hi all,

I'd like to list email addresses, telephone numbers, etc. of the Exchange
5.5 (NT4) users, but I can't access these properties.
Anyway I can list some other properties like 'PasswordAge', 'LoginHours',
etc.

My c# code are:
DirectoryEntry Container = new DirectoryEntry("WinNT://myDomain", "myName",
"myPwd");
try {
foreach(DirectoryEntry child in Container.Children) {
if((child.SchemaClassName == "User") && (child.Name == "myName")) {
System.DirectoryServices.PropertyCollection pcoll =
child.Properties;

foreach(string sc in pcoll.PropertyNames)
TextBox1.Text += "\r\n" + sc + ": " + pcoll[sc].Value;
}
}
} catch(Exception ex) {
}

Can anybody help me?
Thanks in advance,
elek

Nov 15 '05 #1
0 1266

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

Similar topics

0
by: Nitec Dev | last post by:
Our setup: server1 ASP database running on IIS5, Outlook 2000 and SQL 2000 on Windows 2000. Server2 runs Windows 2000 with Exchange 2000 using CDO 1.2 MAPI Sessions. Clients use IE5/6 and had...
2
by: Vincent Nguyen | last post by:
Hi, I have problem create exchange 2000 mailbox using CDOEXM in my Web Service application. The error I got was "Catastrophic failure". Here is the code that I have: DirectoryEntry user =...
5
by: steletroll | last post by:
Hi, i'm getting crazy... I try to translate my vbscripts to C# but i can't retrieve some attributes of an Exchange 5.5 mailbox (particularly Assoc-NT-Account). So, if someone had a piece of...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
2
by: George Durzi | last post by:
We recently upgraded to Exchange2K3/W2K3 from Exchange2K/W2K, and some of my c# code that I used to access users' contacts using WebDAV has stopped working. I'm getting a 401 unauthorized error....
0
by: Tim Sapp | last post by:
Guys, I am working on a new web site for our company and have started to move my code from VB.Net to C#. I have ran into a snag that I can't seem to figure out. I am trying to create an...
0
by: jayeldee | last post by:
Hello all, I have a service that's using CDO 1.21 and Redemption to routinely iterate through a list of users to retrieve some properties which are then written to a database. My problem is...
2
by: =?Utf-8?B?YXJqZW4xOTg0?= | last post by:
I have the following code that creates a user and makes a mailbox with it: private void kandidaatAanmaken(string voornaam, string achternaam, string gebruikersnaam) { string password =...
7
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.