After upgrading to 17.4, Aspose Email throws an Object reference exception when trying to GetContacts from office365.
This is the code I’m using:
var client =EWSClient.GetEWSClient(MAILSERVER, mailAddress, mailPassword, domain);
var contactCollection = client.GetContacts(client.MailboxInfo.ContactsUri);
This is the error I get:
2017/05/23 12:28:03.604 EXCEPTN [26] Services.DataService.Helpers.HttpStatusCodeExceptionHandler Handle - System.NullReferenceException from Aspose.Email
2017/05/23 12:28:03.619 EXCEPTN [26] Services.DataService.Helpers.HttpStatusCodeExceptionHandler Handle - Object reference not set to an instance of an object.
2017/05/23 12:28:03.619 EXCEPTN [26] Services.DataService.Helpers.HttpStatusCodeExceptionHandler Handle - at #=qHx$H819s6J8V8_2Ad3PdzPWfCuzyVmTBJG$1SpkOykZULl4DXYPkQDi2w8i2y25Q.#=qyBTs6Pm2XT7rrY_lTARbYAXxNwFe2_ZmWVzZbGSX4bk=(ContactItemType #=qmVrhCJV6clysV3ksht4VgQ==, List`1 #=q3j$EWAIrro_hVJZ65SVzXq2hZgNr8TS$0JctaJu_Ypo=)
at #=q$URVFJ46Py_sB1wW4BhrMlxBBAff4rCUmTy697lRNldEs5shCrH0bISWYGq4qZttr2BeOO9wOaIaWYtwWk6gnQ==.#=qelzCaEmFjO5lCC_iw6H$rw==(List`1 #=qXbHE6Sf3DIOashJDq1P$iA==, ExchangeListContactsOptions #=qnVinIpv3grjH1YTaHEyVNw==)
at #=q$URVFJ46Py_sB1wW4BhrMlxBBAff4rCUmTy697lRNldEs5shCrH0bISWYGq4qZttr2BeOO9wOaIaWYtwWk6gnQ==.GetContacts(String #=q9wodUnHA4FXo71BdJz4meA==)
at Services.DataService.Controllers.DocumentsController.Contacts(String emailpass) in C:\Workspace\6.2Patch\Source\Services\REST\DataService\Controllers\DocumentsController.cs:line 1447
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
This issue is re-produced and logged under Id:EMAILNET-38753 for further investigation by the product team. You will be automatically notified once any update is received in this regard.
at #=q46bCUqGsDG$h2hXsY_YuoUv8_T1vDaDxSSayhRP3U$HRSwBcZfrHSCACB034Wsxf.#=qHFL$noo7Rej7NPsXx22PVHOWUwwv00C1nWm$73AeVI8=(String #=qtBSdXAHT0dVknebNVYYU1A==, Int32& #=qSTCWT30Bl_JJQCZbpTEGQw==, String& #=q_ZsakSS6EnWwlX78w2a53Q==)
at Aspose.Email.MailAddress.#=qT0OMOk3d4SpyuQGFXqiJ8g==(String #=qX9r7fQDcHYBdp7Sln1S$hA==)
at Aspose.Email.MailAddress.#=qKf6peq4vulZEA3KBqYIme6a4r0v_Vnr5GiwGmaU19pw=(String #=qX9r7fQDcHYBdp7Sln1S$hA==)
at Aspose.Email.MailAddress.set_Address(String value)
at #=qCsj6d7Nyv$B0vE6HlCrvN0eQddAPCecoKBEF_Zhi0EMKct$iXnaBc9UAt3zMESZd.#=qVXcQCKpX1xHOzcJVEwxdQCzRxz$IE$WjN5CY21dZi_A=(ContactItemType #=qeZfWVIbegoy4K6V5chEe4Q==, List1 #=qRis$Z$IsOlhxFZeLJvUKwi2$CqR9XYRWdt$Yo0OzUL4=)</div><div> at #=q$yz4C5jwN9cJZYeawrTUTPCDGBoXj02TULPb9$GFNlvOJO7bkpLv0peNWloirobt05vvpHwb4uVML3K2BYEEOQ==.#=qQeUiZj9Hsl1qOQrI5MCiF1ikn51GVI38P8wpiUWg4dE=(String #=qN5JO4My0wm8Pt3$dsjKBpeJaxE59OSGz0fyeZ7D0Dj8=, ResolveNamesSearchScopeType #=q3zFBnS4WEDs_WvsyIFWBQQ==, ExchangeListContactsOptions #=qgK40ADtCd73AQrOA96$63g==)</div><div> at #=q$yz4C5jwN9cJZYeawrTUTPCDGBoXj02TULPb9$GFNlvOJO7bkpLv0peNWloirobt05vvpHwb4uVML3K2BYEEOQ==.GetMailboxes()</div><div> at Services.DataService.Controllers.DocumentsController.Contacts(String emailpass) in C:\Workspace\6.2Development\Source\Services\REST\DataService\Controllers\DocumentsController.cs:line 1432</div><div> at lambda_method(Closure , Object , Object[] )</div><div> at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)</div><div> at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary2 arguments, CancellationToken cancellationToken)
The issue was reproduced at our end and has been logged as EMAILNET-38769 for further investigation by our Product team. We’ll update you here once there is some feedback or a fix version available in this regard.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.