Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2004

Tip: Looking for answers? Try searching our database.

QueryInterface for interface xxxx failed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 09 Jun 2004 19:07 GMT
I am somewhat new to .net so if this is a stupid question please forgive me. I
have a dll that was written in VB6, that I am trying to use with asp.net. I have
been developing the site on my local machine, and have deployed to our test
environment successfully. Now I am trying to get this to work in production and
I am getting the following error:

QueryInterface for interface classname failed
Exception Details: System.InvalidCastException: QueryInterface for interface
class failed.

Now I thought that this may be a permissions issue so I tried making the aspnet
user an administrator on the box just to be sure it was not permission related.
This did not work. In reading through some past messages I tried adding
<identity impersonate="true" /> to the web.config. I didn't have to do any of
this on the test server but I gave it a try anyway, no luck. I finally got it
working by chaning the code to use late binding rather than early binding. My
question is, why should I have to do this? It just bothers me that it is not
working the same in our test and production environments.

Anybody have any ideas what the problem could be?

Thanks so much!

Scott
Patrick Steele [MVP] - 10 Jun 2004 18:30 GMT
> I
> have a dll that was written in VB6, that I am trying to use with asp.net. I have
[quoted text clipped - 5 lines]
> Exception Details: System.InvalidCastException: QueryInterface for interface
> class failed.

Did you set the "AspCompat" flag of your Page direct to true?

<%@ Page AspCompat="true" ... %>

Signature

Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Scott - 10 Jun 2004 19:09 GMT
Patrick,
Thanks for the reply. I did not try the ASPCompat page directive. I actually
have the code in the global.asa and I don't think you can use the ASPCompat in
global.asa. This problem is just driving me nuts because I have gotten the exact
same code to work on 3 other web servers, it is just this production server that
is giving me trouble and I have checked everything I can think of.

Thanks!
Scott

>> I
>>have a dll that was written in VB6, that I am trying to use with asp.net. I have
[quoted text clipped - 9 lines]
>
><%@ Page AspCompat="true" ... %>

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.