using EWS Managed API to verify a person against company's Outlook GAL

Unanswered using EWS Managed API to verify a person against company's Outlook GAL

  • Thursday, February 21, 2013 1:56 PM
     
     

    I am tring to create a COM+ component inherited from .NET ServicedComponent class and using EWS API to verify if a person is existing in our company's Outlook GAL.
     when I implement IsOurEmail() function shown below directly in Console application, it works. but we I put it into a COM+ component and call this function from a console app, there is an error occurred:
     "System.Runtime.Serialization.SerializationException: The constructor to deserialize an object of type 'Microsoft.Exchange.WebServices.Data.ServiceResponseException' was not found."
     
    I found this errror is caused by NameResolutionCollection. do you know how to fix it?

    Transaction(TransactionOption.Required)]
     public class MyExchange : ServicedComponent
     {
      ...
     
     [AutoComplete(true)]
             public Boolean IsOurEmail(ref string strSurName,
                                        ref string strGivenName)
             {
                 Boolean blnReturnValue = false;
     
                ExchangeService m_service = OpenSession();
                 NameResolutionCollection nameResolutions;
     
                strGivenName = strGivenName.Trim() + " ";
     
               nameResolutions = m_service.ResolveName(
                                                     strSurName,
                                                     ResolveNameSearchLocation.DirectoryOnly,
                                                     false);
                
                 ......