473,468 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Create 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 6979

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
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
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
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
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
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
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
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
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
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
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.