473,386 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

QueryInterface for interface comFileFuncs._clsFileFuncs failed in ASP.NET.

Hello, I have created a activeX dll in vb6 that contains some functions
I am using in .NET. I created the dll in vb6 with:

Instancing = 5-Multiuse
MTSTransactionMode = 2-RequiresTransaction
Persistable = 0-NotPersistable

I then created a COM+ application, set the user to an admin in the COM+
settings and added the dll above as a component. Then from ASP.NET, I
added a reference to the dll created above. Everything was fine (on my
machine), I was able to use the functions from the dll in ASP.NET. I
then proceeded to register the vb6 dll and create the COM+ application
on a test server. When I go to test the functions of the dll from
ASP.NET I received this message:

QueryInterface for interface comFileFuncs._clsFileFuncs failed

After much testing I decided to create a VB.NET WinForm and see if that
would also fail in the test server. It did not fail! So basically
this is where it works and does not work:

My Machine (Windows 2000 SP4, .NET FRAMEWORK 1.0)
==========
ASP.NET = dll functions work
VB.NET WINFORM dll functions work

Test Machine (Windows 2000 SP4, .NET FRAMEWORK 1.0)
==========
ASP.NET = dll functions DO NOT work, receiving the QueryInterface
failed message
VB.NET WINFORM dll functions work

Any ideas why it is failing just in ASP.NET and just from that one
machine? What setting did I overlook? I also tried the
AspCompat="true" page directive with no difference.

Thanks before hand,
Adiel

Nov 19 '05 #1
1 1309
Ok everyone problem solved. The solution when calling these vb6 COM+
objects is to use late binding (using the "Object" keyword) instead of
early binding. Here is how you do it:

Early Binding (Does not work all the time in .NET :) )
================================================== ====
Dim objFileFuncs As comFileFuncs.clsFileFuncs
objFileFuncs = New comFileFuncs.clsFileFuncs()

Late Binding (Works in .NET!)
=============================
Dim objFileFuncs As Object
objFileFuncs = New comFileFuncs.clsFileFuncs()

You might have a slight performance degredation but, in the long run,
these com+ objects will be obselete so I would not worry about it.

Thanks,
Adiel

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jason | last post by:
I'm writing a small console app in .NET that needs to reference a 3rd party dll. I wrote the app by adding a reference to the 3rd party dll in my project and my code builds and executes...
0
by: Deeps | last post by:
Hi I have created an interface called IGlobal with some properties exposed with a fixed Guid. Created a class inherting this interface. This is my com+ server. I have a client instantiating this...
4
by: Ram | last post by:
I am running a test web site on my own Win2k professional computer. I have a VB6 COM component (running on COM+) on a seperate application runnint as "Server". When running an ASP.NET page calling...
3
by: Von Shean | last post by:
I am trying to user Bulk loader component in asp.net. The code runs perfectly fine in a test harness but gives the following error when used in a strong named dll called from asp.net using c#. The...
1
by: Michael Connerton | last post by:
The company I work for still uses Excel97. In a weaker moment I added the pia for Excel2003 in attempt to get more programatic functionality out of some Excel interfaces I have been writing. The...
0
by: Rodolfo | last post by:
Hi all.... I have to develop a class application but I must use a COM+ DLL (vb6) intalled in a remote COM+ server. The proxy application is already installed in IIS server but I can't use any...
1
by: Joseph | last post by:
I have been using "XMLHTTPClass" in an asp.net module. It is properly referenced and was working up until recently. Now it is failing with the error message "QueryInterface for interface...
1
by: Fosco Gamgee | last post by:
Hi, I got a ASP.NET application that uses a com dll. The application runs fine on XP and windows 2000 OS, but throws this exception on 2003 server: QueryInterface for interface xxx.yyy failed....
0
by: Vasil Buraliev | last post by:
Hi there, Would you please help me to solve the problem that I have? I'm developing web site using asp.net 1.1 and C#. I made an COM in VC++ 6.0 using MFC and I'm using it in .NET web project....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.