?
Solved

Class creation error

Posted on 2006-10-20
5
Medium Priority
?
335 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 1000 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 1000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Let's recap what we learned from yesterday's Skyport Systems webinar.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

801 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