locked
EWS - OutOfMemoryException RRS feed

  • Question

  • Hi All, 

    hope somebody can help me out with this one,... 

    Our application (32 bit) uses Exchange WebServices to read/create/delete emailMessages, in some cases a OutOfMemoryException is thrown while reading the emailmessage (stack below). any idea how we solve / avoid this behavior?

    Thx

    Luc

    bij System.Text.StringBuilder.ToString()
    bij System.Xml.XmlTextReaderImpl.ParseText()
    bij System.Xml.XmlTextReaderImpl.ParseElementContent()
    bij System.Xml.XmlTextReaderImpl.Read()
    bij System.Xml.XmlTextReader.Read()
    bij System.Xml.XmlCharCheckingReader.Read()
    bij Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read()
    bij Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace,
    String xmlElementName, Func`2 readAction)
    bij Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String
    xmlElementName)
    bij Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
    bij Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.InternalLoadFromXml(EwsServiceXmlReader reader, PropertyBag
    propertyBag)
    bij Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.LoadPropertyValueFromXml(EwsServiceXmlReader reader,
    PropertyBag propertyBag)
    bij Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet
    requestedPropertySet, Boolean onlySummaryPropertiesRequested)
    bij Microsoft.Exchange.WebServices.Data.EwsServiceXmlReader.ReadServiceObjectsCollectionFromXml[TServiceObject](XmlNamespace
    collectionXmlNamespace, String collectionXmlElementName, GetObjectInstanceDelegate`1 getObjectInstanceDelegate, Boolean clearPropertyBag,
    PropertySet requestedPropertySet, Boolean summaryPropertiesOnly)
    bij Microsoft.Exchange.WebServices.Data.GetItemResponse.ReadElementsFromXml(EwsServiceXmlReader reader)
    bij Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
    bij Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.ParseResponse(EwsServiceXmlReader reader)
    bij Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader)
    bij Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponseXml(Stream responseStream)
    bij Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(IEwsHttpWebResponse response)
    bij Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
    bij Microsoft.Exchange.WebServices.Data.ExchangeService.InternalBindToItems(IEnumerable`1 itemIds, PropertySet propertySet,
    ServiceErrorHandling errorHandling)
    bij Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem(ItemId itemId, PropertySet propertySet)
    bij Microsoft.Exchange.WebServices.Data.ExchangeService.BindToItem[TItem](ItemId itemId, PropertySet propertySet)
    bij Toga.Business.ExchangeHome.getMailmessage(Guid mailboxguid, String EntryID, String constring)
    bij Toga.Business.ExchangeHome.getMailmessage(bo_olbericht olbericht, String constring)
    bij Toga.Berichten.BerichtenOutlookGrid_DoubleClick(Object sender, EventArgs e)
    bij DevExpress.XtraGrid.Views.Base.BaseView.RaiseDoubleClick(EventArgs e)
    bij DevExpress.XtraGrid.Views.Grid.Handler.GridHandler.OnDoubleClick(MouseEventArgs ev)
    bij DevExpress.Utils.Controls.BaseHandler.ProcessEvent(EventType etype, Object args)
    bij DevExpress.XtraGrid.Views.Base.Handler.BaseViewHandler.ProcessEvent(EventType etype, Object args)
    bij DevExpress.XtraGrid.GridControl.OnDoubleClick(EventArgs ev)
    bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    bij System.Windows.Forms.Control.WndProc(Message& m)
    bij DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)
    bij DevExpress.XtraGrid.GridControl.WndProc(Message& m)
    bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Wednesday, March 6, 2019 8:58 AM

All replies

  • Hello,

    What you have shown is not enough information to provide suggestions, more information is needed.

    • Is this a new app or old/has the app ever worked correctly.
    • What code is involved? Looks like there is a double click event for a third party grid making some type of call to maybe a business object to get a message from Exchange ???

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Wednesday, March 6, 2019 9:59 AM