Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

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

$
0
0

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);
            
             ......


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>