Solved

Class creation error

Posted on 2006-10-20
5
328 Views
Last Modified: 2010-04-16
Hello,

Please help me why I am getting the error message, its really urgent.

bellow is the error message, which I am getting, I have defined a public class in a .vb file, which I am using trying to use.




Cannot create ActiveX component.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 103:                                                            <td width="25%" align="right" height="40" valign="middle"><%
Line 104:                                                            dim HTTPSConfig as object
Line 105:                                                            HTTPSConfig = createobject("ThanXConfig")
Line 106:                                                            HTTPSConfig.IsHTTPS=false      '''''''Redirect to HTTPS
Line 107:                                                            if Request.ServerVariables("HTTPS")="off"  then
 

Source File: c:\inetpub\wwwroot\cart\viewcart.aspx    Line: 105

Stack Trace:


[Exception: Cannot create ActiveX component.]
   Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName) +231
   ASP.viewcart_aspx.__Render__control3(HtmlTextWriter __output, Control parameterContainer) in c:\inetpub\wwwroot\cart\viewcart.aspx:105
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +44
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +262
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
   System.Web.UI.Control.Render(HtmlTextWriter writer) +7
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
   System.Web
 
0
Comment
Question by:davelalande
5 Comments
 

Author Comment

by:davelalande
ID: 17773337
Hello,

Can anyone please tell me why I getting that error.

Regads,
0
 
LVL 41

Accepted Solution

by:
HonorGod earned 250 total points
ID: 17781759
I don't know what the 'ThanXConfig" is supposed to be, and from the messsage, it would seem that neither does ActiveX.
0
 
LVL 1

Assisted Solution

by:Toby Riley
Toby Riley earned 250 total points
ID: 17857600
When using com objects in .NET the best way is to register the COM object using regtlib (OCX,TLB) or RegSvr32.EXE (DLL) if not already done.

When you do this .NET creates a COM interop library that enables you to access the class using strong typing and normal class creation semantics.

i.e.

Register the component usng regtlib or regsvr32 (or both if required)
In the IDE open the add reference for the project
Select the COM tab
Select you component
Confirm everything and you should have a new reference in you project.

Now you can use the class browser to inspect it and create the class in a standard way.

i.e

Dim oObject as ThanXConfig.MyClass

'create object
oObject =  New ThanXConfig.MyClass(ConstructorArguments)

'call methods/functions
oObject.Method(Args)

'clean up
oObject.Dispose
oObject = Nothing

etc.

etc.

Hope that helps.

Regards

Toby.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question