| | |
how do you properly instantiate an activeX control on aspx
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Jun 2008
Posts: 9
Reputation:
Solved Threads: 0
hey... i currently making a web application, in VS 2008 - visual web developer 2008, for our final project and it makes use of an ocx which has methods to enable VOIP. What i did, since the control cannot be added to the tool box in order for it to be simply 'drag and drop'; i used aximp.exe to produce two dll's ATLH323Lib and AxATLH323Lib; i then referenced these two into my web application using Add Reference in the Solution Explorer.
My earlier error was that i always got an {ActiveX control 'fdd4c8c1-69c9-11d3-9dc8-525400e38cf9' cannot be instantiated because the current thread is not in a single-threaded apartment.} error when i did this... [code below]
Then i tried to do it like this ... [code below]
But then this error would appear... {Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.}
Help Please...
My earlier error was that i always got an {ActiveX control 'fdd4c8c1-69c9-11d3-9dc8-525400e38cf9' cannot be instantiated because the current thread is not in a single-threaded apartment.} error when i did this... [code below]
asp.net Syntax (Toggle Plain Text)
namespace WebVOIP { public partial class _Default : System.Web.UI.Page { //flags to know status of caller static bool inComingCall; static bool onTheLine; //variables in use static string newline = "\r\n"; //Objects that handles the VOIP capabilites of the site private AxATLH323Lib.AxH323 ConnectionControl = new AxATLH323Lib.AxH323(); //ERROR points to this line protected void Page_Load (object sender, EventArgs e) { ConnectionControl.Listen(); //ConnectionControl.ReceivingCall += new ATLH323Lib._IH323Events_ReceivingCallEventHandler(ConnectionControl_ReceivingCall); } .... }
Then i tried to do it like this ... [code below]
asp.net Syntax (Toggle Plain Text)
namespace WebVOIP { public partial class _Default : System.Web.UI.Page { //flags to know status of caller static bool inComingCall; static bool onTheLine; //variables in use static string newline = "\r\n"; //Objects that handles the VOIP capabilites of the site private AxATLH323Lib.AxH323 ConnectionControl; protected void Page_Load (object sender, EventArgs e) { ConnectionControl = new AxATLH323Lib.AxH323(); ConnectionControl.Listen(); //ConnectionControl.ReceivingCall += new ATLH323Lib._IH323Events_ReceivingCallEventHandler(ConnectionControl_ReceivingCall); } .... }
But then this error would appear... {Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.}
Help Please...
Last edited by peter_budo; Aug 31st, 2008 at 2:04 pm. Reason: Keep It Organized - please use [code] tags
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Adding a Combobox in a Datagridview ASP.NET
- Next Thread: Beginner question: Changing contentplaceholder on button click
| Thread Tools | Search this Thread |
.net 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





