Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are battling a bug in the DLR, the dynamic language runtime that was added in .NET 4. The code on the stack trace is related to the VB.NET binder to the DLR. This bug is almost certainly not triggered by the code you posted, it is likely to be some other code in your project that does something with a dbase query. Given the presence of DBNull in the exception message.</p> <p>You'll need support from Microsoft to get to the bottom of this. They'll need your project to give them a repro to work on, given that the code snippet itself won't help them find it. You can contact Microsoft Support to get that started. They'll take a chunk out of your credit card but you'll almost certainly get it back, given that it is likely to be a bug in their code and not yours.</p> <p>There is a possible workaround for this particular failure, although it isn't exactly guaranteed that the DLR corruption isn't going to cause some kind of problem later. You can write the exact same code without using the DLR by writing early bound code. Start that with Project + Add Reference, Browse tab, select c:\windows\system32\mshtml.tlb</p> <p>Then rewrite your snippet to look like this:</p> <pre><code> Dim doc = DirectCast(Me.IEInstance.ActiveXInstance, mshtml.IHTMLDocument2) Dim form = DirectCast(doc.forms("frmRedirect"), mshtml.IHTMLFormElement) If form IsNot Nothing Then Dim elem = DirectCast(form.elements("redirectData"), mshtml.IHTMLInputElement) If elem IsNot Nothing Then elem.value = outlookXML.OuterXml End If End If </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload