Click to See Complete Forum and Search --> : Displaying Address Book from Exchange Server


ashetty
September 2nd, 2004, 08:02 AM
hi,

I am new to asp.net and also CDO. I want to display address book to user. I am doing this using MAPI

this is the piece of code i writting.

Public Function DisplayAddBook() As Boolean
Dim objSession As New MAPI.Session
Dim strProfileInfo As String
strProfileInfo = "exchangeservername" & vbLf & "MyUserid"
Try
objSession.Logon("", "", False, True, 0, True, strProfileInfo)
objSession.AddressBook( _
Title:="Select", _
forceResolution:=True, _
recipLists:=3, _
toLabel:="&abc", _
ccLabel:="&xyz", _
bccLabel:="&lmn")

Return True
Catch ex As Exception
Return False
End Try
End Function

there are two things i want to ask
1) on successfull logon objSession.Logon should return a object in my case it is returning System.DBNULL. What does this mean?

2) objSession.Addressbook gives an exception "[Collaboration Data Objects - [MAPI_E_NO_SUPPORT(80040102)]]".

This is urgent any help will be appreciated. Thanks in advance

MRutledge
September 2nd, 2004, 04:55 PM
Can you using Active Directory? If you can I would use the directory services in .NET to access the exchange data and display it.

ashetty
September 3rd, 2004, 02:05 AM
Can you using Active Directory? If you can I would use the directory services in .NET to access the exchange data and display it.

I have no idea of Active Directory. For using MAPI what are the configuration requirements. I have a exchange server 2000 on a remote server and outlook 2000 installed.

Doesnt MAPI directly interacts with exchange server to retrieve the address list does it require outlook in any case?

MRutledge
September 3rd, 2004, 10:16 AM
Usually with Exchange 2000 it uses Active Directory. I think that was the first version they went to. Talk to your network guys to see if it is using active directroy.

ashetty
September 6th, 2004, 02:02 AM
hi,

Sorry, i think i havent provided complete information. My Exchange server and Web Server are on different machines. I want to remotely access the exchange address book. I think for using Active directory my exchange and web server should be on same machine. If not, what rights do i need to access the address book.

i knw that remote access to Exchange 2000 using ADO is not allowed. Does CDO 1.21 and other versions allow remote access?

MRutledge
September 6th, 2004, 02:30 PM
They do not have to be on the same machine. All you are doing is an LDAP query. Start looking into LDAP and quering active directory.

Srain
December 8th, 2009, 12:00 AM
Hi

Please can you tell if any resolution you got for this issue

As am getting similar error when tried accessing address book from ASP 3.0

objSession.Addressbook gives an exception "[Collaboration Data Objects - [MAPI_E_NO_SUPPORT(80040102)]]".