.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Enumerate contacts in a public folder using LDAP....

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
Hi,Within my Outlook (under Folder List) I have the following public folder:Public Folders ---> All Public Folders ---> Corporate ContactsThe "Corporate Contacts" folder holds a number of Contact objects.Using LDAP I'm trying to locate this public folder ("Corporate Contacts") and enumerate through the contacts in order to produce a client list.I'm using DirectorySearcher.Filter = "(&(objectClass=publicfolder))" to pull out the list of public folders but all I get is:CN=DefaultCN=exchangeV1CN=globaleventsCN=internalCN=microsoftCN=OAB Version 2CN=OAB Version 3aCN=Offline Address Book - \/o\=Company Ltd\/cn\=addrlists\/cn\=oabs\/cCN=Offline Address Book - First Administrative GroupCN=OWAScratchPad{4F2AEF03-46EB-4086-AB7A-CE8FD05FBD14}CN=StoreEvents{4F2AEF03-46EB-4086-AB7A-CE8FD05FBD14}CN=Schedule\+ Free Busy Information - First Administrative GroupCN=schema-rootWhatever I try I cannot seem to find the "Corporate Contacts" public folder.Can someone offer any pointers or assistance on this as its beginning to drive me crazy! Many thanks in advance.

View Complete Post

More Related Resource Links

Cannot crawl Exchange 2007 SP2 Public Folder

I am trying to crawl Exchange Public Folders within the free version of Sharepoint 2010 (Search Server). I have followed the instructions within the tech document http://technet.microsoft.com/en-us/library/ee806927.aspx and teh account which is being used is a domain administrator with a Mailbox and full access to the Public Folders. When ever a undertake a crawl it runs for a minute and then produces the following error: Error while crawling LOB contents. ( In order to access a public folder, the effective caller must have a mailbox. ) Is there anyway I can further diagnose this issue as I have tried different domain accounts into the crawl rule but with no effect. Many thanks in advance.

Contacts created in Outlook put into 'Local Failures' folder

We have users with Outlook 2007 sync'd to a WSS 3.0 contact lists. New contacts created in WSS appear fine in Outlook. However if a user "Creates new contact from same company" (within outlook) or drag/drops contacts from outlook personal contacts to sharepoint list, the contact always gets put into the 'local failures' box. There have been posts about checking any contact website address is entered correctly, this is not the issue.  During outlook send/receive, these errors appear: Task 'SharePoint' reported error (0x81020014) : 'Failed to copy one or more items. For details, see the log file .' Task 'SharePoint' reported error (0x00000000) : 'OURCOMPANY Intranet - COMPANY Contacts - Failed to copy one or more items because some are not compatible with SharePoint. The failed items were moved to your Local Failures folder and replaced with copies from the server. If you need assistance troubleshooting items in your Local Failures folder, a Help topic is available at the following address: http://go.microsoft.com/fwlink/?LinkId=70300. For details, see the log file .' The microsoft link is dead, so no use. Can anyone help? - thanks  

save reports in Private and Public folder using Report Builder 2.0




I have a report builder built on RB2.0. Users are able to create their reports and browse them.

Now, Users wants these reports to be saved in their Private folder and public folder.


Also, I have a UI developed in .Net 3.5 from where I am calling this report builder.  In the UI, I need to show the users those reports that they have created in a drop down list. And when the user clicks on any report (that they created should) open.


I have searched a lot but not getting any clue how to allow the business user to save a report

Sharepoint Outlook Public Contacts Firstname Lastname Not Updating Correctly


Users using Outlook 2007 Sharepoint public contacts have been having problems where firstname lastname have amalgamated into lastname.

First Name John
Last Name: Doe

Appears as

First Name:
Last Name: John Doe

I had the user change the first name/last name within Outlook Sharepoint public contacts but this does not reflect the change in other users Outlook contacts.

e.g. User 1 (Outlook 2007) modifies existing contact to

First Name: John
Lastname: Doe

User 2 see's

Trying to enumerate the contents of folder ''. Can't open data connection (425).


Hello Guys,

I know there were posts before about this issue but contacting the web hoster did not help me.
The oddity is, that the same website files, copied and pasted, connection string altered to point to the
production/live db, published to the httpdocs folder works fine BUT the same web files, copied and
pasted, connection string altered to poin to the dev db, published to the subdomains/dev fodler causes the error below:

 ------ Build started: Project: AHN, Configuration: Debug Any CPU ------
   AHN -> P:\Web_Development\xxx\DEV\bin\xxx.dll
------ Publish started: Project: xxx, Configuration: Debug Any CPU ------
Connecting to ftp://xxx.co.uk/subdomains/dev/httpdocs...
Transformed Web.config using Web.Debug.config into
Copying all files to temporary location below for package/publish:
Deleting existing files...
An error occured trying to enumerate the contents of folder ''. Can't
open data connection (425).
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

When I asked the hoster whats going on, he obsiously that its not his fold because the publishing is

Error when crawling Exchange 2003 public folder


Hi all,

When crawling Exchange 2003 public folder, I get the following message in the crawl logs:

url : https://myserver/public/xxx
A component required for crawling this type of content is not registered with this application server. View the event logs for more information.

The configuration of our production environment is:

  • SharePoint Server 2010 Enterprise Version with december 2010 cumulative update
  • 2 front end + 2 app server

I tried to distribute the crawl component to different servers of the farm : same problem.

We have an integration server (a all in one configuration) and we success in crawling the public folder. The configuration of the content source and the crawl rules are exactly the same with production.

Thank you in advance for your help,


Pierre Vivier-Merle - MVP SharePoint Server - http://blogs.developpeur.org/pierre

How to track the changes of user contacts(colleagues) by using SharePoint API

We might have seen colleague tracker web part which keep tracks the changes made in our contacts/colleagues details like profile/lists/sites. The same tracking mechanism can be implemented by using MOSS API in any custom web part/ web control/ feature/web service...

UserProfile.GetColleagueChanges is the method which returns all changes happened with the contacts, this method also accepts a Query (UserProfileChangeQuery) where we can specify different parameters to filter the changes

Public Shared function doubt????

I am using VB.net/ASP.NET and SQL Server 2000 for a web application.

For populating the dropdowns, I wrote a Public Shared function LoadDDL(), in which I pass the dataset and dropdown name to set.

I have my doubts that this function will produce unexpected results for concurrent users. And will mix the results among sessions because it is a Shared function.

I am confused here. Is it the right way to go?

Please advice. Thanks in advance.


NUnit and public static readonly


I have an app that I am testing with NUNit.  The project im testing has several helper classes that are created as public static readonly.  When I run the NUnit tests, they all fail with the same error

SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.
SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.

I kept getting this error despite stripping out all

Get Member from LDAP using C# 2.0


I'm currently writing a process where I need to determine if an User on my LDAP string is an Admin.

How can I accomplish this?  What would be the easy and quickest way?

I've been trying to use the code below..... Any feedback is greately appreciated. Tks



Combining two LDAP queries


Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?
Query 1: (&(!cn=SystemMailbox{*})(&(&(ou>="")(name=executive*)(objectCategory=organizationalUnit)(ou=*operations))))
Query 2: (&(!cn=SystemMailbox{*})(&(ou>="")(name=50*)))
Thanks in advance.

Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?


LDAP nested groups filter


Hi all,

In my organization we use nested groups.

For a particular usage, we have a group (let's assume that the group name "kuku"), and the names of all the nested groups under it contains "kuku" as well.

We may assume that no other group in the LDAP has "kuku" in the name.

I need to create a filter which will return all the users which belong to one of the "kuku"s group.

Obviously, using this filter will bring only the head kukus

(&(&(objectclass=user)(objectclass=person))(memberOf=CN=kuku,cn=.rest of the group DN.))

How can I use wild card to fetch all users which belong to any kuku?

For example: (&(&(objectclass=user)(objectclass=person))(memberOf=CN=.*kuku.*))



LDAP - Can't find server


Hey people,

I would like to get a persons name from their username - a common query on forums i know, but i haven't managed to get mine working yet and any help would be appreciated.

I currently have this code that I found here: http://www.vbforums.com/showthread.php?t=612655 (Thanks Chris128)

I have adapted it from VB into VB.net. The page renders but when i enter my username into the Username textBox and hit the submit button (Which calls IsUser) I just get "The specified domain either does not exist or could not be contacted." I have tried lots of other code but I always get this response...

If anyone can help by posting links to a tutorial or another post for code that they know works, i will give it a go.


Imports System.DirectoryServices

Partial Class UserInfo
    Inherits System.Web.UI.Page

    Private Function GetRealNameFromAd(ByVal UsernameToFind As String) As String
        Using searcher As New DirectorySearcher(New DirectoryEntry())
            searcher.PageSize = 1000
            searcher.SearchScope = SearchScope.Subtree
            searcher.Filter = "(&(samAccountType=805306368)(sAMAccountName=" & UsernameToFind & "))"
            Using Results A

Getting users list reporting to manager from LDAP


Dear All,

I need to get list of users reporting to a particular manager from the Active directory.

In the active directory there is manager property with contains the data in the following way.


Please help me in building the filter condition.

I am using the following

pUserName="Gegore Lid";

strSearch = "(&(objectClass=user)(objectCategory=user)((Manager cn=" + pUserName + "))";

DirectorySearcher dSearcher = new DirectorySearcher(dEntry, strSearch);

            //Account properites to load
            string[] arrPropertiesToLoad = { "displayName", "department", "manager", "sAMAccountName", "EmployeeNumber", "Title" };

          SearchResultCollection sResultColl = dSearcher.FindAll();

 the above code is not returning any result.

Please help me in this.



How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

help needed: Ldap User authentication using userDN and password



Is it possible to authenticate a user using userDN and password? If so, then tell me the syntax.So far i have tried to authenticate using username and password from my c# code using directoryentry which takes the parameters like domainname,username and password. But i need to authenticate using Userdn and password.

helped needed: ASP LDAP authentication failed in IE 8


I use the following code to do the user authentication through Active Directory using LDAP.

entry = new DirectoryEntry("LDAP://" + server, user_name, password);
if (!string.IsNullOrEmpty(entry.Name))
EmployeeNetId = entry.Username.Substring(0, 3);

// Retrieve EmployeeId, and Employee Full Name
EmployeeId = -1;

It works for Chrome, Firefox with no problem. But with IE 8, it works sometimes, and failed on some computers. When it failed, I figured that I need to check SSL 2.0 in IE 8 Internet Options.  It's weird because in those computers that IE 8 works, SSL 2.0 is also unchecked.

Am I using some deprecated method? Or How do I specifiy the SSL version options in the LDAP connection?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend