How is this error possible? "The data necessary to complete this operation is not yet available" on internal MSXML2.DOMDocument30

0

I'm running a Windows server 2019 VB.Net Web Service. It runs fine except periodically I get the following error on a line that has been executed many, many times before the error:

System.Runtime.InteropServices.COMException (0x8000000A): The data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A) at MSXML2.IXMLDOMNodeList.get_item(Int32 index) at LMWAPI.Service1.CMI_Setup(Object& oRoot, String[] CMI, String CMIDataElement, String strValue) in D:\Data\CADE.Net\LMWAPI\Service1.asmx.vb:line 548

Public mDoc As MSXML2.DOMDocument30
...
Dim xList As MSXML2.IXMLDOMNodeList
Dim CMIroot() As MSXML2.IXMLDOMElement
...
547 xList = mDoc.getElementsByTagName(CMI(i))
548 CMIroot(i) = xList.item(0)

mDoc is a public variable and loaded at the start of the program and used many times before the error occurs. It is never modified, only read throughout the program. xList is defined locally in the subroutine with CMIroot. Line 548 gets executed multiple times on each transaction and there are thousands of transactions in a day. The error may only pop up once or twice a day.

So, is my problem that xList is not fully "ready" to use?.. is there a way to tell? Or am I just completely off?

xml
vb.net
asked on Stack Overflow Jan 28, 2021 by Velocedge

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0