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
> 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" ... %>