Solved

"Unable to cast COM object" build error in VS2005

Posted on 2009-04-14
10
984 Views
Last Modified: 2013-11-26
I made some minor code modifications in an ASP.NET application today that used to work fine.  Now I get the following error when I try to build it:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.Web.Interop.IVenusCompProcessFeedback'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{E8055D9A-534A-4742-ADE4-0DE82F078371}' failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).

This application has one custom COM dll that has always worked fine in the past.  It also has 3 custom .NET dlls.  I've tried re-attaching all of the references, but that didn't help.  I've also searched on the web, but nothing seems to fit with what I'm seeing.  Thanks in advance for your help.
0
Comment
Question by:jrstx
  • 6
  • 4
10 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 24141206
Find the dll for that com component
.IVenusCompProcessFeedback' whatever.
Then do the following.Your com registration may be corrupted

regsvr32 -u "C:\yourdirectory\.IVenusCompProcessFeedback.dll"

regsvr32 "C:\yourdirectory\.IVenusCompProcessFeedback.dll"

Note that the path should be the actual path where the com component is.I have put an example


0
 

Author Comment

by:jrstx
ID: 24141337
I don't have any dll by that name.  That's what makes it so confusing.  I found one reference on the web to someone having a similar problem, but there was no resolution.
0
 
LVL 15

Expert Comment

by:spprivate
ID: 24141414
Can you list out all the dlls in your bin directory.Either it is a control you are using or a reference you have over looked
0
 

Author Comment

by:jrstx
ID: 24141620
Here they are:

ABBDataAccess.dll
HitCounter.dll
Interop.ADODB.dll
Interop.COMSVCSLib.dll
Interop.Reports.dll
Reports.dll
WebChart.dll

My References are:
ABBDataAccess
HitCounter
Interop.COMSVCSLib
Interop.Reports
MySQL.Data
System.Data.OracleClient
System.Design
System.Windows.Forms
WebChart

I'm not sure why "System.Windows.Forms" is in there, but something keeps adding it and "System.Design" back in whenever I delete them.  It may be the WebChart control.
0
 
LVL 15

Expert Comment

by:spprivate
ID: 24141763
hmm
even i google a little with no result.
Is that web chart a third party or which is the thirdparty tool you are using

use this key E8055D9A-534A-4742-ADE4-0DE82F078371 and search in the registry to see what is the associated entry for it
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:jrstx
ID: 24141996
WebChart is a third-party control that I got from "http://www.carlosag.net/Tools/WebChart/".  It works very well.  I've used it before.

I searched the registry on my development machine and found the key.  It has a string value of "IVenusCompProcessFeedback" and 3 subkeys: "ProxyStubClsid", "ProxyStubClsid32" and "TypeLib".  The first 2 subkeys have a string value of "{00020424-0000-0000-C000-000000000046}".  When I search the registry for that GUID, I get a key with a value of "PSOAInterface" and 2 subkeys of "InprocServer" and "InprocServer32".  These 2 subkeys point to "ole2disp.dll" and "oleaut32.dll" respectively.  The "TypeLib" subkey has a GUID that points to "Visual Studio Web Project CBM Support".

I will be leaving to go home soon, so if I don't respond to your next reply today, I will respond tomorrow.

Thank you very much for your help.  I really appreciate it.
0
 

Author Comment

by:jrstx
ID: 24147889
I've got some more information on this.  I tried recreating the website a piece at a time to see where it would break.  When I turned on impersonation in the web.config file using:

<authentication mode="Windows"/>
<identity impersonate="true" userName="Domain\username" password="password"/>

I got the very same error.  This used to work, I don't know what could have changed.  I wonder if a Microsoft patch may have broken something.  I need to use impersonation because the application has to access an access database on a file share.
0
 

Author Comment

by:jrstx
ID: 24148423
Okay, I've figured out what is happening.  If I make the user that I'm impersonating a member of the Domain Admins group, everything works fine.  I tried just making it an Administrator on the web server, but I got the same error.  So it would appear that the impersonated user must be a domain admin in order to successfully build the application in Visual Studio.  Does anyone have any idea why this would be?  Is there any way around it?
0
 
LVL 15

Accepted Solution

by:
spprivate earned 500 total points
ID: 24149199
Normally we would need the two user have proper rights ASPNET and IWAM_MacName (internet user account),so that it can start IIS out of process applications .
So once you use impersonation instead of using ASPNET it is trying to use the new user who didnt have enough rights which broke the system .
0
 

Author Comment

by:jrstx
ID: 24149487
Wouldn't this impersonated user have enough rights as a member of the Administrators group on the web server?  I tried that and it still didn't work.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now