I have been working with a third party COM component for a couple years
now, and have been integrating our .NET website,
We recently upgraded the version of the third party application, and
now when I run my code, I get:
QueryInterface for interface MEAOAM._AddressMap failed.
A couple of interesting points:
1) Works on my dev box, Win2000. Does not work on Windows 2003 Server.
2) I have upgraded the third party app (which the COM component comes
with). The version and GUID of the COM component has remained
contstant.
3) The COM component is *not* in Component Services in either machine.
This has to do with a combo of the new version of the 3rd party app/com
component and the OS.
Any thoughts?
TIA,
Jason
The stack trace is below:
=======
All Details:
QueryInterface for interface MEAOAM._AddressMap failed.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: QueryInterface for
interface MEAOAM._AddressMap failed.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidCastException: QueryInterface for interface MEAOAM._AddressMap
failed.]
MEAOAM.AddressMapClass.set_Account(String Account) +0
LaLonde.Framework.Mail.MailingList.DeleteMailingList(String postOffice,
String listName) +328
LaLonde.Components.MailingLists.RefreshUsersOnMailServer() +86
LaLonde.Components.MailingLists.RefreshUsersInMailServer(Portals
currentPortal) +194
LaLonde.Web.MailingLists._default.UpdateFilesButton_Click(Object
sender, EventArgs e) +17
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +1277
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: QueryInterface for
interface MEAOAM._AddressMap failed.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidCastException: QueryInterface for interface MEAOAM._AddressMap
failed.]
MEAOAM.AddressMapClass.set_Account(String Account) +0
LaLonde.Framework.Mail.MailingList.DeleteMailingList(String postOffice,
String listName) +328
LaLonde.Components.MailingLists.RefreshUsersOnMailServer() +86
LaLonde.Components.MailingLists.RefreshUsersInMailServer(Portals
currentPortal) +194
LaLonde.Web.MailingLists._default.UpdateFilesButton_Click(Object
sender, EventArgs e) +17
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+138
System.Web.UI.Page.ProcessRequestMain() +1277
NOtcarvinSPAM@lycos.com - 02 Mar 2005 13:55 GMT
Did you upgrade your dev box too? If the upgraded version works on the
development machine I think the problem is something else.
This sounds like a conflict involving the threading apartments (STA vs
MTA).
Tom
DidierT - 18 May 2005 11:00 GMT
Hi,
I've the same problem on a W2000 machine. The interop generated works fine
when I use it from a windows application but I also get an
InvalidCastException / QueryInterface failed when I use the same interop from
Web Service.
> Did you upgrade your dev box too? If the upgraded version works on the
> development machine I think the problem is something else.
[quoted text clipped - 3 lines]
>
> Tom
David Douglas - 07 Jun 2005 20:42 GMT
Make sure the typelib is registered ie (make sure there is a
typelib entry for the clsid in the registry). You might also want
to download and install regmon to make sure that it is not a
permissions problem with the registry.
- David