473,503 Members | 1,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

QI for IEnumVARIANT failed on the unmanaged server.


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.En umeratorToEnumVariantMarshaler.MarshalNativeToMana ged(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
Nov 22 '05 #1
1 6980

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/...810a1bcf8f66e4

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\{000 20404-0000-0000-C000-000000000046}]
@="IEnumVARIANT"

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

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

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

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1208
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
1
545
by: Brian Kelly | last post by:
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...
4
10299
by: Roland Moschel | last post by:
Hi there ! I have some Problems to get a SafeArray out of a COM Server written in (Unmanaged) C++. From (unmanaged) Visual Basic , everything is ok , but unfortunately in C# I get an...
15
11727
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
2
8338
by: marat | last post by:
I have a managed c++ function below that makes a call to an unmanaged c++ dll .. This function is called from a C# app, resulting in a "Debug Assertion Failed dbgdel.cpp Line 52 Expression:...
2
3886
by: Jozsef Bekes | last post by:
Hello, I need to derive an interface in C# from a COM interface that has been declared in C++, and this parent interface uses the type IEnumVariant a a function parameter. Since the stdole...
1
2246
by: RaKKeR | last post by:
Hi, I'm trying to wrap my unmanaged c++ code into a managed c++ wrapper. The problem is VC .NET doesn't seem to find the namespaces defined in my unmanaged code. Let's say I have a file...
2
1450
by: trantanm | last post by:
Hi everybody, I failed to call unmanaged functions in C++ dll from C# application. If I compile and produce the C++ dll file in .NET environment, I can call them from C#. Is the reason that the...
7
15671
by: Ragnar Agustsson | last post by:
Hi all I have been wandering about the best way to sandbox memory leaks in 3rd party libraries when using them from the .Net framework. I have a 3rd party library, written in C++, that leaks a...
3
1682
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a unmanaged dll and I could call it successfully in winform app. But in web service it will failed, and I was in debugging mode, it was executed in admin account. Why? Thanks, -Billy
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.