Hello!
In my .NET application I use Microsoft.Exchange.WebServices 2.2.0 package to interact with the Exchange Server.
I create the ExchangeService class and call the method:
Folder.Bind(exchangeService, WellKnownFolderName.Inbox).
Most of the time the call is successful. But once in a while I am getting an exception:
System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.WrapStream(Stream responseStream, String contentEncoding) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetResponseStream(IEwsHttpWebResponse response) at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response) at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute() at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet) at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder] at Microsoft.Exchange.WebServices.Data.Folder.Bind(ExchangeService service, FolderId id, PropertySet propertySet) at Microsoft.Exchange.WebServices.Data.Folder.Bind(ExchangeService service, WellKnownFolderName name)...
The exception occurs sporadically.
Does anyone know how to tackle this issue?
Thank you in advance!