My goal is to create a common component used by multiple ASP.NET web applications to verify if a person is existing in our company's Outlook GAL. I chose to create a COM+ component inherited from ServicedComponent class and using EWS API to verify user.
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 NameResolution. do you know how to fix it?
msnd
0 Points
1 Post
COM+ component: using EWS API to verify user against Outlook GAL
Feb 08, 2013 05:46 PM|LINK
My goal is to create a common component used by multiple ASP.NET web applications to verify if a person is existing in our company's Outlook GAL. I chose to create a COM+ component inherited from ServicedComponent class and using EWS API to verify user.
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 NameResolution. 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);
......