QI for IEnumVARIANT failed on the unmanaged server.

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
 
B

Brian Kelly

In continuing my search for an answer... I found one! Apparently,
uninstalling InstallShield Developer caused the problem. This thread
contains more details:

http://groups-beta.google.com/group..._doneTitle=Back+to+Search&&d#db810a1bcf8f66e4

Per the thread's instructions, I imported the following data into my
registry, and all was resolved.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}]
@="IEnumVARIANT"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\NumMethods]
@="7"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid]
@="{00020421-0000-0000-C000-000000000046}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid32]
@="{00020421-0000-0000-C000-000000000046}"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top