Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Contacts / October 2005

Tip: Looking for answers? Try searching our database.

Contacts not showing up in the addressbook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nostra - 14 Oct 2005 13:06 GMT
Hi,

we are currently experiencing problems with contacts not showing up in the
addressbook. Al of these contacts were imported from a SQL Server database by
means of a C# application. When we open such a contact, everything seems ok.
When we remove the mail address and/or the displayname and add it again
(simply cut/paste), save the contact, it shows up in the addressbook.

The code which is used to insert the contacts is as follows:

//prep request
HttpWebRequest Request = (HttpWebRequest)WebRequest.Create(Url + "/" + File);
Request.ContentType = "text/xml";
Request.Method = "PROPPATCH";
           

//proxy
Request.Proxy = _Proxy;

//set named credentails
if(_IsDefaultSecurity)
    Request.Credentials = CredentialCache.DefaultCredentials;
else
{
    CredentialCache Cache = new CredentialCache();
    Cache.Add(new Uri(Url), _Security, _Credential);
    Request.Credentials = Cache;
}

//encode the body using UTF-8
byte[] bytes = null;
bytes = Encoding.UTF8.GetBytes((string)XmlData);
Request.ContentLength = bytes.Length;

//get request stream.
Stream Data = Request.GetRequestStream();

//inject data into request
Data.Write(bytes, 0, bytes.Length);

//release connection
Data.Close();

The data which is used to create the contact is this:

"<?xml version=\"1.0\" encoding=\"UTF-8\"?><d:propertyupdate
xmlns:cal=\"urn:schemas:calendar:\"
xmlns:mapi=\"http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/\"
xmlns:g=\"urn:schemas:httpmail:\" xmlns:d=\"DAV:\"
xmlns:e=\"http://schemas.microsoft.com/exchange/\"
xmlns:j=\"urn:schemas:mailheader:\" xmlns:x=\"xml:\"
xmlns:con=\"http://schemas.microsoft.com/mapi/\"
xmlns:b=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\"
xmlns:c=\"urn:schemas:contacts:\"><d:set><d:prop><c:sn>blabla</c:sn><d:contentclass>urn:content-classes:person</d:contentclass><c:givenName>haha</c:givenName><c:cn>Test
Contact</c:cn><e:outlookmessageclass>IPM.Contact</e:outlookmessageclass><con:email1addrtype>SMTP</con:email1addrtype><con:email1emailaddress>john.doe@dummy.be</con:email1emailaddress><g:subject>blabla</g:subject><c:fileas>TestContact</c:fileas><c:personaltitle>Mr.</c:personaltitle><con:email1originaldisplayname>John</con:email1originaldisplayname></d:prop></d:set></d:propertyupdate>"

We tried the "Check Names" option in Outlook, but this doesn't work. We
actually need to change the mail address or displayname to get it to show up.

Is there something we forgot to do?

We are using Outlook 2003 (no Service packs applied... stupid, I know, but
we don't have anything to say in this...)

Thanks.
Russ Valentine [MVP-Outlook] - 14 Oct 2005 22:45 GMT
Importing Contacts will frequently fail to resolve the email addresses.
Addresses will not show up in the Address Book until they are resolved.
You should ask your question in a programming group to see if someone knows
how to write code that will resolve electronic addresses as you import them.
Signature

Russ Valentine
[MVP-Outlook]

> Hi,
>
[quoted text clipped - 64 lines]
>
> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.