0x800A01B6 ( ><)-- ugh!

Add-in Express™ Support Service
That's what is more important than anything else

0x800A01B6 ( ><)-- ugh!
Accessing DOM object always works the first time, but sometimes not the second time. 
Michael Moore


Guest


We may need to delay the upgrade of our new CRM application due to an issue with our integration...


We're using the Add-in Express Explorer Bar (AddinExpress.IE.ADXIEBar) to interface with the fields in a web page. We're seeing a "System.NotSupportedException: Exception from HRESULT: 0x800A01B6" error when attempting to access the DOM. Our call always works the first time, then we navigate to the home page in the same domain, go back - sometimes the code works again...sometimes we receive the error. Once we receive the error, we always receive the error thereafter.


Here is the code:



Dim htmlDoc As New Object
htmlDoc = IEApp.Document.getElementById("ptifrmtgtframe").contentDocument.getElementById("CC_360_SRCH_CMP").elements.namedItem("CC_360_WRK_CC_PHONE_ALT")
htmlDoc.GetType.InvokeMember("value", System.Reflection.BindingFlags.SetProperty, Nothing, htmlDoc, New Object() {"7575797152"})
Marshal.ReleaseComObject(htmlDoc)
htmlDoc = Nothing


All the code is run from the ADXIEBar. We don't have any code in the IEModule due to it requiring admin rights to install. One of the requirements of the application was to allow non-admin users to install it.


We are using Visual Studio 2015 and running the application in Windows 7 with IE 11. Any help you could provide to get this working would be greatly appreciated!
Posted 26 Aug, 2016 02:10:40 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Michael,

Do you execute this code in the DocumentComplete2 event handler?
Posted 26 Aug, 2016 04:50:34 Top
Michael Moore


Guest


Do you execute this code in the DocumentComplete2 event handler?


We are executing this code from a button, for testing. We had been using the DocumentComplete event handler for this function.
Posted 26 Aug, 2016 04:57:45 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Michael Moore,

My guess is that some script produces an exception on the target page. That is why the code may not work properly. Please try to debug the code in order to determine what operation causes the 'NotSupportedException' error.
Posted 26 Aug, 2016 09:52:47 Top