G
Guest
Recently (and all of a sudden), I've been receiving the following error
message in an ASP.NET application that loops through a COM collection via
interop:
"QI for IEnumVARIANT failed on the unmanaged server."
The stack trace is as follows:
[InvalidCastException: QI for IEnumVARIANT failed on the unmanaged server.]
System.Runtime.InteropServices.CustomMarshalers.EnumeratorToEnumVariantMarshaler.MarshalNativeToManaged(IntPtr pNativeData) +535
AccessNet.Interop.AAA.AAAUsersClass.GetEnumerator() +0
AccessNet.ACP.Users.Page_Load(Object sender, EventArgs e) in
c:\accessnet\source\authenticare\web\users.aspx.cs:127
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
The line of code that is failing is as follows:
foreach (AAAUser oUser in moAdminClient.Users)
This code has been working on my machine for quite a while. I'm not aware
of any conditions which may have caused it to fail.
This code works just fine on other machines... just not mine.
I've been searching for more details on this particular error message to
help me troubleshoot, but I've had no success so far. Any guidance would be
greatly appreciated!
Thank you,
Brian
message in an ASP.NET application that loops through a COM collection via
interop:
"QI for IEnumVARIANT failed on the unmanaged server."
The stack trace is as follows:
[InvalidCastException: QI for IEnumVARIANT failed on the unmanaged server.]
System.Runtime.InteropServices.CustomMarshalers.EnumeratorToEnumVariantMarshaler.MarshalNativeToManaged(IntPtr pNativeData) +535
AccessNet.Interop.AAA.AAAUsersClass.GetEnumerator() +0
AccessNet.ACP.Users.Page_Load(Object sender, EventArgs e) in
c:\accessnet\source\authenticare\web\users.aspx.cs:127
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
The line of code that is failing is as follows:
foreach (AAAUser oUser in moAdminClient.Users)
This code has been working on my machine for quite a while. I'm not aware
of any conditions which may have caused it to fail.
This code works just fine on other machines... just not mine.
I've been searching for more details on this particular error message to
help me troubleshoot, but I've had no success so far. Any guidance would be
greatly appreciated!
Thank you,
Brian