473,387 Members | 1,791 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,387 software developers and data experts.

Cannot create ActiveX component in ASP.net but it is OK in command prompt vbc

Hi

I am using third party COM component which come with an installation
program (.exe file included). The program will be register to registry
automatically upon installation.

There is no problem calling the COM component from VB.net Module from
DOS Command Prompt :

Imports System
Imports Microsoft.VisualBasic

Module Module1
Sub Main()
Try
test()
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try

End Sub

Sub test()
Console.WriteLine("*** Start of Testing COM component")

Dim request As Object = CreateObject("Equx.EquxRequest")
Dim res as String = request.getResult()
Console.WriteLine(res)
End Sub

End Module
From Visual Studio.net, I added Reference to Equx.tlb file
and put Imports Equx, copy+paste test() method
But the same code failed to perform after I to ASP.NET Page_Load

Exception Details: System.Exception: Cannot create ActiveX component.

Source Error: Dim request As Object = CreateObject("Equx.EquxRequest")

If I change the above line to :
Dim request As Equx.EquxRequest = new Equx.EquxRequest
the error says that the factory can not create the object.

I am quite new in COM/VB
Please help...
Nov 18 '05 #1
1 7650
Check the permissions on this file. With a console application, the
application runs with your user credentials, and they obviously have
permission to use that file. With ASP.NET, the application runs with
different credentials (by default the ASPNET account, which is created when
you install the framework), and if this account doesn't have rights to get
to this file, then it is going to fail.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Zhou Jingxiong" <ji************@yahoo.com.sg> wrote in message
news:89*************************@posting.google.co m...
Hi

I am using third party COM component which come with an installation
program (.exe file included). The program will be register to registry
automatically upon installation.

There is no problem calling the COM component from VB.net Module from
DOS Command Prompt :

Imports System
Imports Microsoft.VisualBasic

Module Module1
Sub Main()
Try
test()
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try

End Sub

Sub test()
Console.WriteLine("*** Start of Testing COM component")

Dim request As Object = CreateObject("Equx.EquxRequest")
Dim res as String = request.getResult()
Console.WriteLine(res)
End Sub

End Module
From Visual Studio.net, I added Reference to Equx.tlb file
and put Imports Equx, copy+paste test() method
But the same code failed to perform after I to ASP.NET Page_Load

Exception Details: System.Exception: Cannot create ActiveX component.

Source Error: Dim request As Object = CreateObject("Equx.EquxRequest")

If I change the above line to :
Dim request As Equx.EquxRequest = new Equx.EquxRequest
the error says that the factory can not create the object.

I am quite new in COM/VB
Please help...

Nov 18 '05 #2

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

Similar topics

2
by: Cathy Thomas | last post by:
Has anyone run into this problem? An ASP page creates a command object that calls a stored procedure. This was working one day; next, it stopped. I am not in control of the various patches that get...
3
by: Pat | last post by:
A97, WinXP Hello, I am looking for a way to create a task (in the windows task scheduler) from an Access MDB using VBA. I found this great DLL: ...
2
by: W. Broersen | last post by:
I want to use Outlook.Application, but I donot get further. Dim objOLApp As Outlook.Application objOLApp = CreateObject("Outlook.Application") Everytime I'll get the following error: Cannot...
2
by: Jay Bienvenu | last post by:
I cannot create new Web applications in Visual Studio .NET 2003. I get this error message: "Visual Studio .NET cannot create or open the application. The likeliest problem is that required...
1
by: Rocio | last post by:
I have a windows app. written in VB6, now we need to expose some of its classes through a web service. I am only able to expose the classes using late binding becasue that's the way the original...
16
by: Heinz K | last post by:
Hello all, I'm developing a vb.net 2.0 webservice which accesses a lotus notes database using lotus domino api. This works fine on my local client if I select "Use Visual Studio Development...
6
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
1
by: alpana.dhole | last post by:
I have made a ActiveX control for commericial application. A Drag and Drop component for Mail server. I need to host the component in Internet Explorer. When a user opens a mail it should...
7
by: Rico | last post by:
Hello, I have a VB6 ActiveX DLL project that I use to connect to an SQL Server database. The front end that uses this DLL is written in Access XP / 2002. When I modify the ActiveX code, compile...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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.