Solved

Class creation error

Posted on 2006-10-20
5
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

749 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