Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

OutOfMemory Exception occurs while bind EmailMessage. #272

Open
sabariramesh opened this issue Sep 30, 2021 · 1 comment
Open

OutOfMemory Exception occurs while bind EmailMessage. #272

sabariramesh opened this issue Sep 30, 2021 · 1 comment

Comments

@sabariramesh
Copy link

Hello,
I am facing OutOfMemory Exception occurs while bind EmailMessage. It generally occurs for binding email with large size of attachments. For me, issue was occurred at 32 Mb size of attachments. I have mentioned stack trace below. Please help us to resolve the issue

Thread-Id : 17 : Exception of type 'System.OutOfMemoryException' was thrown. Thread-Id : 17 : at System.Text.StringBuilder.set_Length(Int32 value) at System.Xml.XmlTextReaderImpl.ParseText() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Xml.XmlCharCheckingReader.Read() at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read() at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func2 readAction)
at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.InternalLoadFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.LoadPropertyValueFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag)
at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested)
at Microsoft.Exchange.WebServices.Data.EwsServiceXmlReader.ReadServiceObjectsCollectionFromXml[TServiceObject](XmlNamespace collectionXmlNamespace, String collectionXmlElementName, GetObjectInstanceDelegate1 getObjectInstanceDelegate, Boolean clearPropertyBag, PropertySet requestedPropertySet, Boolean summaryPropertiesOnly) at Microsoft.Exchange.WebServices.Data.GetItemResponse.ReadElementsFromXml(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName) at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.ParseResponse(EwsServiceXmlReader reader)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponseXml(Stream responseStream)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalBindToItems(IEnumerable1 itemIds, PropertySet propertySet, ServiceErrorHandling errorHandling)
at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem(ItemId itemId, PropertySet propertySet)
at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem[TItem](ItemId itemId, PropertySet propertySet)
at Microsoft.Exchange.WebServices.Data.EmailMessage.Bind(ExchangeService service, ItemId id, PropertySet propertySet)`

Regards,
Sabari

@sabariramesh
Copy link
Author

Hello,
Please let me know the status of above issue. We really need this to resolve. Please help me.

Regards,
Sabari

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant