Recently, I faced up with strange behaviour of ResolveName
method of ExchangeService
class. This method should finds and resolves contacts in a specified user’s Contacts folder and the Global Address List (GAL).
Method is called in the following way:
var emailAddress = @"user@example.com"; var resolutions = service.ResolveName(emailAddress); if (resolutions != null && resolutions.Count > 0) return resolutions[0].Mailbox; return null;
where service
is the [correctly] initiated variable of type ExchangeService
class.
In the following instances ResolveName
method returns the empty list:
- Email address is incorrect;
- If
user
‘s account is hidden from Exchange address list.
But one of the customers has Exchange installation and/or ActiveDirectory settings such that ResolveName
method returns the empty list for correct non-hidden mail address. Unfortunately, I didn’t find any reasons of such behaviour.
- All used IP-addresses, names of servers, workstations, domains, are fictional and are used exclusively as a demonstration only.
- Information is provided «AS IS».