none
using EWS API to verify user against OutLook GAL RRS feed

  • Question

  • i am tring to create a COM+ component inherited from 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 it 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);
                
                ......

    Thursday, February 7, 2013 10:33 PM

Answers

  • creation of commpon component in .net in general means creating simple .net dll (assembly), signing it with strong name and putting it inside GAC - no COM+ or WCF is needed.

    Friday, February 8, 2013 8:14 PM

All replies

  • why are you hosting it in COM+ container? what services of COM+ do you use for that component?
    Friday, February 8, 2013 6:48 AM
  • I'd like to create a common component used by multiple ASP.NET web applications to verify if a user is in company's Outlook GAL. this is the reason I put email func into a COM+ container. or maybe should I use WCF instead. I do not know.
    Friday, February 8, 2013 3:52 PM
  • creation of commpon component in .net in general means creating simple .net dll (assembly), signing it with strong name and putting it inside GAC - no COM+ or WCF is needed.

    Friday, February 8, 2013 8:14 PM
  • so I do not have to inherit my class from ServicedComponent then.

    Friday, February 8, 2013 8:42 PM
  • no, create your class, create strong name for assembly and put that assembly in GAC, it will be available for all apps on that machine.
    Friday, February 8, 2013 10:25 PM