473,569 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

QueryInterface for interface comFileFuncs._c lsFileFuncs 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
MTSTransactionM ode = 2-RequiresTransac tion
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._c lsFileFuncs 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 1321
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.cl sFileFuncs
objFileFuncs = New comFileFuncs.cl sFileFuncs()

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

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
417
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 perfectly. However, when I made a setup file and installed it on another box, I get: System.InvalidCastException: QueryInterface for interface...Failed. ...
0
1241
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 object with prog id. I made a build and installed the application, everything works fine. Now, I changed the interface to add one more property and...
4
4907
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 this component, it works fine, but When I try and debug the Com+ process using the VB6.0 IDE, I get the following error: "Exception Details:...
3
2449
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 error is QueryInterface for interface Interop.SQLXMLBULKLOADLib.ISQLXMLBulkLoad failed If anyone has any idea how do we use bulkloader in...
1
2359
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 pia is entitled 'Microsoft.Office.Interop.Excel.dll' I also added the registry entries for that pia by running...
0
1085
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 mtehod of this dll. The following error is occuring: "QueryInterface for interface DLL.Class failed" I've been testing this code in an ASPX page...
1
2806
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 MSXML2.IXMLHTTPRequest failed" when I attempt to use the open method of this object. I would appreciate help on this. I have searched high and low on the...
1
1259
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. Any ideas? Regards,
0
870
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. There is no problems with COM component on my development enviroment. I'm adding COM as reference in the web project, Visual Studio do the job to...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8122
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.